2011-10-20 225 views
4

我现在正在使用Core-plot开发应用程序。 我正在寻找一些触摸事件,用户触摸图表的一点, 然后它显示的价格。iPhone CorePlot:用户触摸事件图表

当我看看的CorePlot网站, 它有一个应用程序显示什么,我需要 http://code.google.com/p/core-plot/wiki/AppsUsingCorePlot

enter image description here

我真的想通过睿情节做这个功能, 我现在使用CorePlot 0.4 我想要做下面的函数 enter image description here

enter image description here

我真的想要一个触摸事件,它可以显示点用户触摸的指定价格。

非常感谢!

回答

1

使用手势重新整合它为此工作fine.in第一次轻击你显示价格和第二次隐藏。

7

CorePlot提供了很多的方法来检测用户触摸:

曲线图:

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

对于情节空间:

@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; 
包含核心图显示
6

Mac的CPTTestApp示例程序如何完成你描述的内容。在查看菜单下查看点选择演示