我没有将图标识符作为图例标签,而是提供自定义文本。我的情节标识符不适合作为标签,例如“#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
。
我的实施中出现了什么错误?
如何覆盖基本图例标签并为每个标签提供自定义文字?
答案 0 :(得分:0)
试
-(NSString *)legendTitleForBarPlot:(CPTBarPlot *)barPlot recordIndex:(NSUInteger)index
'似乎有些错误=) 只是一个疯狂的猜测。