apexcharts/ng-apexcharts

Bug with animation when updating series of an area chart

Opened this issue · 1 comments

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?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.