Core-Plot - CPScatterPlot Animation

I am developing an iPhone application in which I am showing a graph using the core of Core-Plot. The graph is made from CPScatterPlot, and what I'm trying to do is to animate the appearance of this graph on the screen.

I am not looking for fading animation, or for the graph to be shifted to the left of the screen. I would like the user to see each point of the graph appearing one at a time (starting from the left), so that it would seem that the graph is slowly being traced.

I doubt that Core-Plot provides "slowdown" of the graph trace, so I probably have to fully implement this from scratch. Does anyone know how I can do this?

thanks

+2
source share
1 answer

I have not tried, but the approach I would like to use is to use two separate scatterplots that are configured using the same appearance properties (line style, graph symbols, etc.). Make one hidden and load the first point to another. Download the first two points in the hidden plot and use Core Animation to make it disappear. When the animation ends, hide the first graph, load the first three data points into it and extinguish it. Repeat this alternating pattern until all data points are loaded.

+2
source

All Articles