Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to define steps to leftAxis #5132

Open
hape42 opened this issue Dec 10, 2023 · 0 comments
Open

how to define steps to leftAxis #5132

hape42 opened this issue Dec 10, 2023 · 0 comments

Comments

@hape42
Copy link

hape42 commented Dec 10, 2023

I am trying to create a line chart

Example

This works quite well so far. However, I cannot set the values on the left axis in 250 steps as desired.You can see my last attempt here:

ChartYAxis *leftAxis = self.lineChartView.leftAxis;
leftAxis.labelTextColor = [UIColor colorNamed:@"ColorGraphSD"];
leftAxis.axisMinimum = 0;
leftAxis.axisMaximum = ceil(maxValue / 250.0) * 250;
leftAxis.drawGridLinesEnabled = YES;
leftAxis.drawZeroLineEnabled = NO;
leftAxis.granularityEnabled = NO;
leftAxis.granularity = .1;
leftAxis.axisRange = 250;
leftAxis.labelCount = ceil(maxValue / 250.0);

Debugger tells me leftAxis.labelCount = 8; and leftAxis.axisMaximum = 2000;

All I want is a line at 259,500,750....

How to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant