IPhone CorePlot: Touch Custom Event Chart

Now I use Core-plot to develop the application. Iā€™m looking for some kind of touch event for a user touching one point of the chart, then he shows the price.

When I look at the CorePlot site, It has an application showing what I need http://code.google.com/p/core-plot/wiki/AppsUsingCorePlot

enter image description here

I really want to execute this function using Core-plot, now I am using CorePlot 0.4 I want to make the following function enter image description here

enter image description here

I really want to have a touch event that can show the price of the touch price of a user's point.

Thank you very much!

+4
source share
3 answers

CorePlot provides many ways to detect user touch:

For charts:

-(void)barPlot:(CPBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)index; -(void)scatterPlot:(CPScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index; -(void)pieChart:(CPPieChart *)plot sliceWasSelectedAtRecordIndex:(NSUInteger)index; 

For sketching space:

 @protocol CPPlotSpaceDelegate <NSObject> -(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point; -(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(id)event atPoint:(CGPoint)point; -(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceUpEvent:(id)event atPoint:(CGPoint)point; 
+7
source

The Mac CPTTestApp sample program included with Core Plot shows how to do what you describe. Watch a demonstration of selecting points in the View menu.

+6
source

use gesture recolonization for this, it works great. First touch the u screen and the second skin.

+1
source

All Articles