【发布时间】:2015-11-24 09:03:10
【问题描述】:
How to show bar values on CorePlot -Stacked bar chart
在这篇文章之后,我想更改堆叠条形图的图例标题值,默认情况下它采用代码中给出的“集合”值。 我无法更改“sets”值,因为我使用它来匹配并从 Web 服务获取值。
上图不是“D”、“O”、“P”,我需要给出全名的含义。 我尝试了coloredBarChart中给出的这样的代码,
-(NSString *)legendTitleForBarPlot:(CPTBarPlot *)barPlot recordIndex:(NSUInteger)index
{
return [NSString stringWithFormat:@"Bar %lu", (unsigned long)(index + 1)];
}
然后它看起来像下面,它获取图表中所有堆叠条的索引值。
如何更改 core-plot 中的图例标题值?
【问题讨论】:
标签: ios charts core-plot legend