I need to be able to animate a LineChart based on the SeriesInterpolate data effect (I will have an Array of dataproiders). I want to have a “Play” button that will:
- initialize the LineChart with the first dataprovider in the array
- start the animation and wait for the animation to finish before loading the second data provider
- repeat the process until all data providers in the Array are loaded
Any thoughts?
No problem, you’re just going to use the effectEnd event
So on your effect, you’ll want to attach the effectEnd listener, something like this :
Then in your code, you need to store your datasets, and an index of which you’re currently viewing, and finally the method that switches them.
As far as the play button, all it needs to do is make the first call to fetchNextDataset();
Make sense?