mariusmuntean / ChartJs.Blazor

Brings Chart.js charts to Blazor
https://www.iheartblazor.com/
MIT License
691 stars 152 forks source link

The animation configuration is wrong/missing #86

Closed Joelius300 closed 4 years ago

Joelius300 commented 4 years ago

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

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.