Core Plot legendTitleForBarPlot永远不会被调用(bug?)

时间:2012-03-15 14:32:23

标签: objective-c ios core-plot

我没有将图标识符作为图例标签,而是提供自定义文本。我的情节标识符不适合作为标签,例如“#OpMarg”,我想用“操作边距”替换

我已经实现了方法

-(NSString *)legendTitleForBarPlot:(CPTBarPlot *)barPlot recordIndex:(NSUInteger)index

-(BOOL)legend:(CPTLegend *)legend shouldDrawSwatchAtIndex:(NSUInteger)index forPlot:(CPTPlot *)plot inRect:(CGRect)rect inContext:(CGContextRef)context;

但是,永远不会调用legendTitleForBarPlot

我的实施中出现了什么错误?

如何覆盖基本图例标签并为每个标签提供自定义文字?

1 个答案:

答案 0 :(得分:0)

-(NSString *)legendTitleForBarPlot:(CPTBarPlot *)barPlot recordIndex:(NSUInteger)index

'似乎有些错误=) 只是一个疯狂的猜测。