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 disable scale of left YAxis? #2748

Closed
webersson opened this issue Aug 24, 2017 · 2 comments
Closed

How to disable scale of left YAxis? #2748

webersson opened this issue Aug 24, 2017 · 2 comments

Comments

@webersson
Copy link

I have a CombinedChartView with CandleStickChartView and BarChartView:

bildschirmfoto 2017-08-24 um 14 52 25

The right YAxis values are changed with valueFormatter.
I set the axisDependencies like this:

    candleChartSet.axisDependency = combinedView.rightAxis.axisDependency
    barChartSet.axisDependency = combinedView.leftAxis.axisDependency

Is there a way to prevent only the left YAxis from scaling?
If I scale now, the barChart disappears under the bottom of the chart:

bildschirmfoto 2017-08-24 um 14 53 11

I thought maybe there is a way to disable the scaling just for the left Axis.
Would be great to get some advice.

@Visangle
Copy link

try to set leftAxis like this

        bar.leftAxis.axisMinimum = 0
        bar.leftAxis.axisMaximum = 5
        bar.leftAxis.calculate(min: 0, max: 5)

hope have some help.

@liuxuan30
Copy link
Member

when you scale, it's scaling the y direction, which means you cannot scale only one of them.

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

3 participants