I want to disable pinch zoom at barchart
in MPAndroidChart
library how i can do that.
library.barchart.setpinzoomenable(false);
also not working.
Marker will continue to work but zoom will be disable
chart.setTouchEnabled(true)
chart.setPinchZoom(false)
chart.isDoubleTapToZoomEnabled = false
fragmentHomeBinding.lineChart.setTouchEnabled(true);
fragmentHomeBinding.lineChart.setDragEnabled(true);
fragmentHomeBinding.lineChart.setScaleXEnabled(true);
fragmentHomeBinding.lineChart.setScaleYEnabled(false);
fragmentHomeBinding.lineChart.setPinchZoom(false);
fragmentHomeBinding.lineChart.setDoubleTapToZoomEnabled(false);
In above code, I have enabled scaling in X-axis and disabled in Y-axis.
Since no one has included anything about axis wise scaling after turning off zooming (as per the latest library), the following lines will disable pinch to zoom as well as x,y-scaling whatsoever:
barChart.setPinchZoom(false)
barChart.setScaleEnabled(false)