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

Feature Request: Animate on data change #186

Open
mrsamse opened this issue Aug 21, 2020 · 2 comments
Open

Feature Request: Animate on data change #186

mrsamse opened this issue Aug 21, 2020 · 2 comments

Comments

@mrsamse
Copy link

mrsamse commented Aug 21, 2020

Do you want to request a feature or report a bug?

Feature

If I set the "animate" Poperty to true, the chart will be nicely built up at start. Now the user can change the data of the chart and I would like to animate these changes.Now if I only change the data of the chart, it will be displayed correctly, but unfortunately no animation happens.

@toomuchdesign
Copy link
Owner

Hi @mrsamse,
this is definitely a missing feature. :)

Chart's segments actually don't shrink/grow gradually but pretend to do so using the styling strategy described here.

Animation is issued on mount with a specific workaround but animation on values update seems quite harder to achieve with the same approach.

It's not impossible but problematic considering this library's performance and weight requirements.

@toomuchdesign
Copy link
Owner

A different approach could consist of animating chart's segments by using an external library to tween the changing input values and re-render the chart accordingly. Of course, performances should be monitored in this case.

Here is a quick setup to support the idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants