Reputation: 633
I am now using Core-plot to develop application. I am looking for some touch event for user touch one point of the chart, then it show up the price.
When i take a look of the CorePlot website, It has a application show what i need http://code.google.com/p/core-plot/wiki/AppsUsingCorePlot
I really want to do this function by Core-plot,
i am now using CorePlot 0.4
i want to do the following function
I really want to have a touch event which can show the specify price of the point user touch.
Thank you very much!!
Upvotes: 4
Views: 2898
Reputation: 27381
The Mac CPTTestApp example program included with Core Plot shows how to do exactly what you describe. Look at the Point Selection Demo under the View menu.
Upvotes: 6
Reputation: 29767
CorePlot provides a lot of ways to detect user touches:
For plots:
-(void)barPlot:(CPBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)index;
-(void)scatterPlot:(CPScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index;
-(void)pieChart:(CPPieChart *)plot sliceWasSelectedAtRecordIndex:(NSUInteger)index;
For plot 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;
Upvotes: 7
Reputation: 2144
use gesture recolonization for this it work fine.in first tap u show price and second hide.
Upvotes: 1