-
Notifications
You must be signed in to change notification settings - Fork 164
Description
Describe the bug
This bug was brought up in a StackOverflow question.
Not all options have an animation property even though all options appear to support it source. Furthermore ArcAnimation should be a sub-class of Animation. Also the easing property is missing in Animation. For that we need a new string enum which we can also use in #57 once we get to it.
The callbacks are also missing but they can only be done after #70 is merged.
Which charts does this bug apply to?
All of them even though some avoid the trouble by having their own animation property.
How to fix
- Subclass
ArcAnimationfromAnimation - Add
Animationproperty toBaseConfigOptions - Change type to
ArcAnimationor explicitly mentionArcAnimationfor theAnimationproperty ofPolarAreaOptionsandPieOptions. - Add
Easingstring enum - Add
Easingproperty toAnimation - Think about the callbacks, maybe open another issue
Additional info
Most of the info we need can be found under the animation section in the chart.js-docs.
ArcAnimation is used for the pie, doughnut and polar area chart but I don't know if it's possible to make it of that type in those options. Maybe just write it in the summary if we can't enforce the type.
An attempt at fixing this issue was made by @ItsMeDan11 in #74 (thank you!) but unfortunately it doesn't consider all the changes and just fixes it for BarOptions. I will probably take that PR as a reference and create a new one in order to fix this but I don't know yet.