How can I use the animation "collections"?
See original GitHub issueI’m going to use the collections at animation level.
Reading the documentation, it seems that you can assign a name to an object into animation options and this object should contain multiple properties, identified by properties
array.
Therefore I’m trying to add to chart options the following animation configuration:
animation: {
mycolors : {
properties: ['backgroundColor'],
type: 'color',
from: 'black',
duration: 5000,
loop: true
},
},
but my animation configuration is ignored.
Instead, using the same configuration, setting colors
as collection name, it works.
animation: {
colors : {
properties: ['backgroundColor'],
type: 'color',
from: 'black',
duration: 5000,
loop: true
},
},
Then I have the doubt if the collection name must be colors
or numbers
(therefore are fixed) or if I can use different names.
And if I can use different names, how is the animation engine aware about which collection should be used?
Here is CodePen https://codepen.io/stockinail/pen/YzwdObe
Chart.js: dist/master
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
Yes, but let me finish the implementation on the lib (I’m completing the work with the new 3.0.0 features) and then I’ll propose some updates (by PR related to this issue that I’ll reopen) on the doc. Ok?
Sorry, did not mean to save that one. Added
colors: false
(which works also) to the pen.