Prarthana
Prarthana

Reputation: 87

Objective-c Coreplot graph scrolling

I generated a scatterplot graph.My requirement is to swipe the graph part by part ie,if 10 columns of plot r shown on the screen,on the swipe the next 10 columns need to be shown.

-(BOOL)plotSpace:(CPTXYPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(id)event atPoint:(CGPoint)point{
 NSLog(@"point.x=%lf,point.y=%lf",point.x,point.y);
 return YES;
}

This gives the point dragged..how can i achieve my requirement with this method or is their any other way to figure it out?

Anybody please help...

Upvotes: 0

Views: 117

Answers (1)

Eric Skroch
Eric Skroch

Reputation: 27381

Try adding a swipe gesture recognizer to the hosting view. When you get a gesture, change the plot space range to show the next set of data. You can animate the change to the plot range with CPTAnimation.

Upvotes: 1

Related Questions