Closed GoogleCodeExporter closed 8 years ago
This has not been implemented yet.
One way to do it is to become the delegate of CPXYPlotSpace, and receive touch
events that way. You can then compare the touch events with your own data to
determine hits. The CPXYPlotSpace also has methods to convert from view
coordinates to plotting coordinates, which can be useful.
Original comment by drewmcco...@mac.com
on 10 Jul 2010 at 9:09
-(CGPoint)viewPointForPlotPoint:(NSArray *)numbers;
-(NSArray *)plotPointForViewPoint:(CGPoint)point
I think you are talking about these two methods, I already done with these two
but these two are not supporting if you have any example plz send it to me.
Original comment by monikadh...@gmail.com
on 12 Jul 2010 at 6:42
Please see this comment
http://code.google.com/p/core-plot/issues/detail?id=168#c4
Original comment by drewmcco...@mac.com
on 12 Jul 2010 at 7:41
i want to add labels on onclick event in my graph.Means when i clicked on a
particular bar than that bar label will appear on screen.how i find which bar
is selected by user.
Original comment by monikadh...@gmail.com
on 13 Jul 2010 at 5:44
We have just added this functionality to CPScatterPlot, but not yet to
CPBarPlot. You may be able to figure out how to do it from the scatter plot
code. Basically, you will want to become the delegate of the CPXYPlotSpace, and
receive the touch events that way. You can convert points to the plot
coordinates using the CPXYPlotSpace and CPPlotArea classes, and then compare to
your data.
We may add this to the framework in the near future.
Original comment by drewmcco...@mac.com
on 13 Jul 2010 at 7:11
how we convert points to the plot coordinates using the CPXYPlotSpace and
CPPlotArea classes, and then compare it to data.
Original comment by monikadh...@gmail.com
on 13 Jul 2010 at 7:33
To get a the plot area view point
CGPoint plotAreaPoint = [self.graph convertPoint:pointInGraph toLayer:plotArea];
To convert the plot area point to plot coordinates
NSDecimal plotPoint[2];
[plotSpace plotPoint:plotPoint forPlotAreaViewPoint:plotAreaPoint];
After this call, plotPoint will have the x and y values in the plot coordinates
(your data space).
Original comment by drewmcco...@mac.com
on 13 Jul 2010 at 1:16
Hi I am really very sorry actually i am new in iphone coding ,below is my
method that is called when i am touching on screen.where i add above conversion.
-(BOOL)plotSpace:(CPPlotSpace *)space
shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point
{
//NSLog(@"point=%@",point);
return YES;
}
Original comment by monikadh...@gmail.com
on 13 Jul 2010 at 1:47
This is not a Core Plot question, it is a general Cocoa question. We can't
teach people Cocoa. I'm afraid you should ask general Cocoa questions on Cocoa
mailing lists.
Original comment by drewmcco...@mac.com
on 13 Jul 2010 at 2:35
Hi,
plz tell me when this error message comes "Previous frame inner to this frame
(gdb could not unwind past this frame)"
Original comment by monikadh...@gmail.com
on 14 Jul 2010 at 8:04
Pause the debugger, and look at the traceback in the debugger. Tell us what
methods are involved.
Original comment by drewmcco...@mac.com
on 14 Jul 2010 at 9:39
problem is solved.thanks.
Original comment by monikadh...@gmail.com
on 14 Jul 2010 at 9:45
how i add cpimage iin my graph.
Original comment by monikadh...@gmail.com
on 14 Jul 2010 at 9:45
Original issue reported on code.google.com by
monikadh...@gmail.com
on 9 Jul 2010 at 9:34