【发布时间】:2013-11-25 10:04:33
【问题描述】:
我正在使用 Core Plot 绘制散点图。它工作正常。但我想在悬停 CPTPlotSymbol 时显示当前值。请看下图:
这是一个示例代码:
- (void)configurePlots
{
[...]
CPTMutableLineStyle *lineStyle = [myPlot.dataLineStyle mutableCopy];
lineStyle.lineWidth = 2.5;
lineStyle.lineColor = [CPTColor greenColor];
myPlot.dataLineStyle = lineStyle;
CPTMutableLineStyle *symbolLineStyle = [CPTMutableLineStyle lineStyle];
symbolLineStyle.lineColor = [CPTColor greenColor];
CPTPlotSymbol *symbol = [CPTPlotSymbol ellipsePlotSymbol];
symbol.fill = [CPTFill fillWithColor:[CPTColor greenColor]];
symbol.lineStyle = symbolLineStyle;
symbol.size = CGSizeMake(6.0f, 6.0f);
myPlot.plotSymbol = symbol;
}
【问题讨论】:
标签: ios iphone objective-c cocoa-touch core-plot