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

Cannot turn off Barchart Zoom Propertry #91

Closed
BurhanMughal opened this issue May 19, 2015 · 3 comments
Closed

Cannot turn off Barchart Zoom Propertry #91

BurhanMughal opened this issue May 19, 2015 · 3 comments

Comments

@BurhanMughal
Copy link

Hi Daniel
I am trying to disable zoom feature for Bar Chart with no success.

This is what I am applying :

_barChartView.dragEnabled = NO;
_barChartView.pinchZoomEnabled = NO;
_barChartView.doubleTapToZoomEnabled = NO;
_barChartView.defaultTouchEventsEnabled = NO;

Still I can zoom it.

Any idea ?
Thanks.

@danielgindi
Copy link
Collaborator

There are 3 different kinds of zoom:

  1. X scaling
  2. Y scaling
  3. Pinch to zoom

When pinch to zoom is enabled, x/y scaling is disabled, as they can't work together. You either scale them together or separately. When it is disabled, then scaling x/y depends of separate properties.

dragEnabled has nothing to do with it, and so does doubleTap.
defaultTouchEventsEnabled does not exist anymore, so you are using an older version ;-)

What you want is scaleXEnabled or scaleYEnabled. Or you can disable userInteractionEnabled to block touches altogether.

@BurhanMughal
Copy link
Author

Thanks a lot :) 👍

@hernanarber
Copy link

Thanks :-)

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