Iphone 如何在折线图中增加plotsymbol和plotsymboltext之间的间距?

Iphone 如何在折线图中增加plotsymbol和plotsymboltext之间的间距?,iphone,core-plot,linechart,Iphone,Core Plot,Linechart,我使用核心绘图框架绘制图形,当用户点击polt符号时,我显示文本。但我的问题是,文本在情节符号上重叠。如何克服这个问题,请帮帮我 我的代码是这样的 - (void) scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index{ if ([plot.identifier isEqual:@"Green Plot"]) { selectedLineIndex1 = index

我使用核心绘图框架绘制图形,当用户点击polt符号时,我显示文本。但我的问题是,文本在情节符号上重叠。如何克服这个问题,请帮帮我

我的代码是这样的

- (void) scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index{
if ([plot.identifier isEqual:@"Green Plot"]) {
    selectedLineIndex1 = index;
    selectedLineIndex2 = -1;
    [graph reloadData];   
}
else if ([plot.identifier isEqual:@"Blue Plot"]) {
    selectedLineIndex1 = -1;
    selectedLineIndex2 = index;
    [graph reloadData];   
} }

是否有任何错误告诉我或有任何其他方式只是建议我请提供一些样品


提前感谢。

我找到了一个解决方案,就在我创建折线图时,在折线图中添加了一个labelOffSet

示例代码

CPTScatterPlot *boundLinePlot2 = [[[CPTScatterPlot alloc] init] autorelease];
CPTMutableLineStyle *lineStyle2 = [CPTMutableLineStyle lineStyle];
lineStyle2.miterLimit = 1.0f;
lineStyle2.lineWidth = 3.0f;
lineStyle2.lineColor = [CPTColor redColor];
boundLinePlot2.dataLineStyle = lineStyle2;
boundLinePlot2.identifier = @"Green Plot";
boundLinePlot2.dataSource = self;
boundLinePlot2.delegate = self;
我把这条线加到折线图上,这样我的问题就解决了

boundLinePlot2.labelOffset = 10.0f;
boundLinePlot2.labelRotation = M_PI_4;

你是怎么画文本的?注释?数据标签?还有别的办法吗?
boundLinePlot2.labelOffset = 10.0f;
boundLinePlot2.labelRotation = M_PI_4;