Charts: Pinch to Zoom is not being disabled properly.

Created on 13 Oct 2015  ·  4Comments  ·  Source: danielgindi/Charts

We are turning off the pinch to zoom by the following code:

self.barChartView.pinchZoomEnabled = NO;

But we are still able to pinch zoom, this has only been happening recently after the latest update to charts, is there something else we need to do to disable it?

Most helpful comment

@GABHISEKBUNTY after having the same issue i found the option to disable all zooming:

self.barChart?.setScaleEnabled(false)

All 4 comments

pinchZoomEnabled is only one way to zoom. There are also per axis zoom options which you need to turn off- and it has always been there...

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

I have tried out the above things but still user is able to zoom the bar chart. Can you please suggest the code to disable X & Y scaling individually.

@GABHISEKBUNTY after having the same issue i found the option to disable all zooming:

self.barChart?.setScaleEnabled(false)

@zanesc You saved my day! Tks

Was this page helpful?
0 / 5 - 0 ratings