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

Align both right and left axis in the same line #3720

Closed
LucaFagan opened this issue Oct 28, 2018 · 3 comments
Closed

Align both right and left axis in the same line #3720

LucaFagan opened this issue Oct 28, 2018 · 3 comments

Comments

@LucaFagan
Copy link

What did you do?

I have a line chart with left and right axises with different range (for example left range is [0..200] and right range is [0..900]).

What did you expect to happen?

I want right and left axis labels aligned to the same line.

What happened instead?

Right axis labels are not aligned with left axis labels.

image

Charts Environment

**Charts version/Branch/Commit Number: 3.0.5
**Xcode version: 9.2
**Swift version: 4.0
**Platform(s) running Charts: iOS 12
**macOS version running Xcode: 10.13.6

Demo Project

You can reproduce the issue in your demo: LineChart2ViewController, setting
rightAxis.axisMinimum = 0.0;
instead of
rightAxis.axisMinimum = -200.0;

@liuxuan30
Copy link
Member

Try out

    @objc open func setLabelCount(_ count: Int, force: Bool)
    {
        self.labelCount = count
        forceLabelsEnabled = force
    }

@LucaFagan
Copy link
Author

That's not what I want. Setting a fixed number of lines I lose the granurality and I don't like how zoom and pan works in this situation.

image

@liuxuan30
Copy link
Member

well either you stick to the same line or use same range/fixed count for the axis.
Imagine yourself if you have two different ranges for left and axis, how can you make sure the interval is fixed and at the same line.

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

2 participants