Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS Coreplot scatterplot animation drawing

I need to animate in ios a scatterplot to make it as the line was drawing. There is a similar effect in this website http://www.highcharts.com .I tried unsuccessfully with basic animation but impossible to make this effect. Does anyone has any idea on how to do it ?

like image 968
user1629713 Avatar asked Nov 12 '22 23:11

user1629713


1 Answers

Unfortunately I've found CorePlot's animation capabilities in this area limiting.

However I have had success achieving the same effect by animating expanding the expansion of a regular UIView which encapsulates the graph.

I don't have my code in front of my at the moment by here is a diagram to highlight how I did it:

enter image description here

The key thing here is you start the initial Animation with a UIView which contains the Graph and who's frame is a smaller width than the graph. Then you animate the frame width to be the full graph size.

When this animates it progressively reveals your graph in a smooth animation.

like image 199
Glen T Avatar answered Nov 16 '22 11:11

Glen T