Mpandroidchart: Fully disable zooming

Created on 13 Mar 2015  路  7Comments  路  Source: PhilJay/MPAndroidChart

Hi, great library!
I've ran into a problem: I have a bar chart, but I don't want it to be zoomable.
I set both methods

chart.setDoubleTapToZoomEnabled(false);
chart.setPinchZoom(false);

But it is still zoomable with pinch.
Any thoughts on this?

Library Version 2.0.7
Android 5.0.2

Most helpful comment

Call chart.setScaleEnabled(...). You can also find this in the documentation.

All 7 comments

Call chart.setScaleEnabled(...). You can also find this in the documentation.

Hi,

Does disabling Zoom also disable Highlighting Per drag?

Disable all zooming:
chart.setScaleEnabled(false)

chart.setTouchEnabled(false);

Ribin this works for chart inner data. But on click my chart position changes

    mChart.setPinchZoom(false);
    mChart.setScaleEnabled(false);
    mChart.setDoubleTapToZoomEnabled(false);

mChart.setScaleEnabled(false);//disbale all zoom
mChart.getLegend().setEnabled(false);//hide chart highlight data

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JungYongWook picture JungYongWook  路  3Comments

andreyfel picture andreyfel  路  3Comments

blotfi picture blotfi  路  3Comments

Giammaofwar picture Giammaofwar  路  3Comments

rohitkumarbhagat picture rohitkumarbhagat  路  3Comments