Open mg1075 opened 8 years ago
This is something I want to add in.
It's a bit tricky, though, because it's difficult for amCharts to know which data has changed and which has not changed.
As an example, if you use chart.dataProvider.push({ ... })
, how does amCharts know that only the last item changed?
It would be nice if amCharts could have declarative animation settings so that rather than writing a function, the animation options could be passed in as part of the chart options. For example, there is an existing chart, then new data updates the chart data; give a hook in the options object to set the animation values for this transition of data.
Maybe there is already a way to do this cleanly with css only animation. Experimenting a only a little, it seems you can, but then the animation triggers whenever you resize a window. Actually this re-starting of animation can also be seen in an amcharts example here: http://codepen.io/amcharts/pen/gbLpMR
I don't want an animation to trigger on any window resize, just when the data changes. Is there a way to do that without resorting to this plugin?