在 CorePlot CPTXYGraph 中是否可以在 Y 轴上显示 int 值而不是十进制值?
问问题
639 次
1 回答
6
just create a number formatter and apply it to the y axis. something like this
NSNumberFormatter *yLabelFormatter = [[NSNumberFormatter alloc] init];
[yLabelFormatter setGeneratesDecimalNumbers:NO];
CPTXYAxisSet *axisSet = (CPTXYAxisSet *)graph.axisSet;
CPTXYAxis *y = axisSet.yAxis;
y.labelFormatter = yLabelFormatter
于 2012-12-28T16:47:58.250 回答