Skip to content

The animation configuration is wrong/missing #86

@Joelius300

Description

@Joelius300

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions