Show the maximum label on y-axis


#1

I create a y-axis with range 0~20 and set major frequency with 10.

It should be shown 0, 10, 20 in my anticipation, but it didn’t.

what’s wrong with it?

Here are my code and figure.

SChartNumberRange *yNumberRange = [[SChartNumberRange alloc] initWithMinimum:@0 andMaximum:@20];

SChartAxis *yAxis = [[SChartNumberAxis alloc] initWithRange:yNumberRange];

yAxis.majorTickFrequency = @10;

_chart.yAxis = yAxis;

Issue about y-axis maximum label
#2

Hi Elmo,

This appears to be an unknown issue with our charts. 

I have forwarded this onto our development team to investigate further.

A work around solution would be to increase the maximum value that is initialised in your Y-axis’ range like so:

SChartNumberRange *yNumberRange = [[SChartNumberRange alloc] initWithMinimum:@0 andMaximum:@20.1];

Let me know how you get on.

Kind Regards,
Andrew Polkinghorn


#3

okay, but I think the work around solution is not good.

Please inform me when you solve it, thanks.

Thanks for your help.