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

Pinch to Zoom is not working as expected over Bar Chart #2479

Closed
gabhisekdev opened this issue May 26, 2017 · 2 comments
Closed

Pinch to Zoom is not working as expected over Bar Chart #2479

gabhisekdev opened this issue May 26, 2017 · 2 comments

Comments

@gabhisekdev
Copy link

Hi,

I have used bar chart. And currently set the following properties of it:

self.barChart?.doubleTapToZoomEnabled = false
self.barChart?.pinchZoomEnabled = false
barChart.dragEnabled = false

But still the zoom is happening. One of the reason that I have not tried out might be disable the individual axis scaling. Can some one please provide me the code for that or any other solution that will work ?

@liuxuan30
Copy link
Member

liuxuan30 commented May 26, 2017

Are you saying if you turn off pinchZoomEnabled, pinch zoom still work? I suspect it. Please just search the code how it's enforced and see what you have to disable.

e.g.

            if _data !== nil &&
                (_pinchZoomEnabled || _scaleXEnabled || _scaleYEnabled)
            {

it's OR op, so only disable one is not enough.

@CavalcanteLeo
Copy link

you may forgot to use this:

Objective-c:

    self.chartView.scaleXEnabled = NO;
    self.chartView.scaleYEnabled = NO;

swift:

    self.barChart?.scaleYEnabled = false
    self.barChart?.scaleXEnabled = false

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