只需创建一个数字格式化程序并将其应用于y轴.这样的事情
NSNumberFormatter *yLabelFormatter = [[NSNumberFormatter alloc] init];
[yLabelFormatter setGeneratesDecimalNumbers:NO];
CPTXYAxisSet *axisSet = (CPTXYAxisSet *)graph.axisSet;
CPTXYAxis *y = axisSet.yAxis;
y.labelFormatter = yLabelFormatter
Run Code Online (Sandbox Code Playgroud)