Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable pinch zoom in MPAndroidChart library

I want to disable pinch zoom at barchart in MPAndroidChart library how i can do that.

library.barchart.setpinzoomenable(false); 

also not working.

like image 396
Hari Avatar asked Jul 22 '16 04:07

Hari


People also ask

How do I turn off zoom in MPAndroidChart?

I want to disable pinch zoom at barchart in MPAndroidChart library how i can do that. library. barchart. setpinzoomenable(false);

How do I turn off pinch and zoom?

Touch or click the picture of the touchpad. Touch or click the Gestures tab. Touch or click the box next to Pinch Zoom to Enable or Disable the Pinch Zoom function.

How do I turn off pinch zoom in HTML?

To disable pinch-zoom in HTML, simply add <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> to the <head> section.


2 Answers

Try this,

Disable all zooming:

chart.setScaleEnabled(false);

More info refer here

like image 172
Sathish Kumar J Avatar answered Oct 12 '22 19:10

Sathish Kumar J


Marker will continue to work but zoom will be disable

chart.setTouchEnabled(true)
chart.setPinchZoom(false)
chart.isDoubleTapToZoomEnabled = false
like image 3
Crebain Avatar answered Oct 12 '22 17:10

Crebain