3.0.0 Animations documentation
See original GitHub issueDocumentation Is:
- Missing or needed
- Confusing
- Not Sure?
New animation engine
Reading the current documentation about new animation engine into v 3.0.0, I 'm a little confused about how the options object should be managed and some new concepts are not explained well. I’m writing here what I understood and what it’s not clear to me.
Animations modes
The animation mode should be a animation options with specific configuration. It’s not clear when the out of the box modes will be called (which which phase of chart drawing or resize).
It’s also possible to create own modes. Any name convention in order do not override “properties” of the animation properties (for instance duration
)?
And if the modes are coming the way to configure animations, why to mix modes and properties in the animation options? Maybe properties should be collected into a default
mode to be more consistent.
In the default animation mode, visible
options is mentioned. What is it? Why isn’t that mentioned into the list of animation options properties?
Collections
It’s not clear what it means to add or remove properties from animation standpoint. For instance, the default for number
is ['x', 'y', 'borderWidth', 'radius', 'tension']
but how those properties are used to affect the animation?
Furthermore there is from
property but the from could be different from every single properties item (x
could have different range of borderWidth
).
Having a look to new samples, it’s not clear the y
property definition here. Maybe could be explained into the doc.
Callbacks
Having a look to new samples, the animation object (whole configuration) can be provided by callback (here the sample), but this is completely missing from documentation.
Hint
I suggest to add more documentation how to configure the animation engine, adding pieces of code if needed in order to have a clear picture about all (or at least almost) cases.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
@kurkle just added a lot to the animation documentation, so I’m going to say this is fixed now
https://www.chartjs.org/docs/master/configuration/animations/
@benmccann I’m referring to sample loop.html where the
animation
options (whole object) if returned by a callback (as scriptable option).This sounds new feature, not available on 2.9.3.