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

Bug with animation when updating series of an area chart #283

Open
johannagere opened this issue Oct 2, 2023 · 0 comments
Open

Bug with animation when updating series of an area chart #283

johannagere opened this issue Oct 2, 2023 · 0 comments

Comments

@johannagere
Copy link

In our application, we have charts of different types (line and area charts) and we update the series-data of the charts every few seconds. When the charts are drawn initially, we want the lines/areas to be animated. However, when the series are updated we don't want the lines/areas to be completely re-animated again. Instead, only the new values should be drawn. To achieve this behaviour, we have set the animations property in the chart options to
animations: { enabled: true, easing: 'linear', dynamicAnimation: { speed: 1000 } },
and we update the series of our charts like this every few seconds
chart.options.series = updatedSeries;
For line-charts this setup leads to the behaviour we want, which means only the new values are drawn but the lines are not completely re-animated. However, for area-charts, this setup causes all the areas to be re-animated every time the series are updated. To avoid this, we tried to set the redrawPaths and animate properties in the updateOptions -method of the area-chart to false but this didn't fix this issue either. Does anyone know how we can prevent the areas to be redrawn on a series-update without having to disable animations completely?

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

No branches or pull requests

1 participant