Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The animation configuration is wrong/missing #86

Closed
Joelius300 opened this issue Mar 24, 2020 · 0 comments
Closed

The animation configuration is wrong/missing #86

Joelius300 opened this issue Mar 24, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@Joelius300
Copy link
Contributor

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 ArcAnimation from Animation
  • Add Animation property to BaseConfigOptions
  • Change type to ArcAnimation or explicitly mention ArcAnimation for the Animation property of PolarAreaOptions and PieOptions.
  • Add Easing string enum
  • Add Easing property to Animation
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant