tags:

views:

176

answers:

1

I have tried to plot a graph using Quartz 2D . It looks more like a drawing. But I am fixing the axes and plotting the coordinates according to the axes. But the problem is I want to make the graph user interactive. Each coordinate on the graph will further have to drill down showing the details of the coordinate. So how can I make the coordinates interactive .

A: 

Rather than rolling your own Quartz graph with interactivity, you might want to take a look at the Core Plot framework, which is available for Mac and iPhone. The stubs are there to provide user interactivity, but we haven't filled in any implementations of this yet.

If you wish, you can implement

-(BOOL)containsPoint:(CGPoint)thePoint
-(void)mouseOrFingerDownAtPoint:(CGPoint)interactionPoint
-(void)mouseOrFingerUpAtPoint:(CGPoint)interactionPoint
-(void)mouseOrFingerDraggedAtPoint:(CGPoint)interactionPoint
-(void)mouseOrFingerCancelled

within the appropriate CPLayer subclass to make that Core Plot element respond to user interaction. We will also be setting up a delegation pattern so that your controllers can handle the logic for interaction events as well.

Brad Larson
ok thank u Brad..I have a new problem now.I am not able get the source of coreplot, I am getting this errorabort: error: nodename nor servname provided, or not knownCan u help me Brad?
You might have a misconfigured Mercurial client. I'd suggest asking on the Core Plot mailing list if you continue having problems: http://groups.google.com/group/coreplot-discuss?hl=en
Brad Larson
Hii Brad,I am executing the command hg clone http://core-plot.googlecode.com/hg/ core-plotin my MAC unix terminal-I am an amateur in UNIX scripting
Again, this is not the appropriate place for technical support. Try the instructions at http://code.google.com/p/core-plot/source/checkout , as well as at http://code.google.com/p/core-plot/wiki/UsingMercurial
Brad Larson