The answer is to set the label formatter on the axis. From a quick look at the documentation for NSNumberFormatter, it seems you should be able to do what you're looking for with a combination of setPositiveFormat
, setMultiplier
, and setPositiveSuffix
.
Something like:
NSNumberFormatter *labelFormatter = [[NSNumberFormatter alloc] init];
[labelFormatter setPositiveFormat:@"#.##"];
[labelFormatter setPositiveSuffix:@"m"];
[labelFormatter setMultiplier:[NSNumber numberWithDouble:0.000001]];
axisSet.yAxis.labelFormatter = labelFormatter;
[labelFormatter release];
FWIW, the call to setPositiveSuffix
isn't strictly necessary here - you can just include the "m" in the format string ([labelFormatter setPositiveFormat:@"#.##m"]
), and leave that call out if you want. I included it here for the sake of completeness, in case you need to do more complex formatting than this.