piaoyongren / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

Animation and touch event not supporting in my app #172

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi ,
I want to add animation and touch event in my core plot project but touch event 
methos not supported by core plot.

I'm looking to carry out an action (display exact value) on touch of a
plot symbol on a scatter graph

Original issue reported on code.google.com by monikadh...@gmail.com on 9 Jul 2010 at 9:34

GoogleCodeExporter commented 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

GoogleCodeExporter commented 8 years ago
-(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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
problem is solved.thanks.

Original comment by monikadh...@gmail.com on 14 Jul 2010 at 9:45

GoogleCodeExporter commented 8 years ago
how i add cpimage iin my graph.

Original comment by monikadh...@gmail.com on 14 Jul 2010 at 9:45