I have a BarChart and I'm trying to disable scaling.
Seems that these methods doesn't work:
setScaleEnabled(false);
setPinchZoom(false);
setDoubleTapToZoomEnabled(false);
I still can double tap or pinch to zoom. If I set setTouchEnabled(false), it works but in this case I'm losing drag to highlight functionality.
Probably a regression?
I used v3.0.1 of MPAndroidChart
It appears that the issue is caused by the fact that I called setScaleEnabled inside overridden init() method, which is called before the mScaleXEnabled field is initialized. I moved this logic to onFinishInflate and now it works.
Hey锛孖 have the same issues "It appears that the issue is caused by the fact that I called setScaleEnabled inside overridden init() method",but I can't find where "the mScaleXEnabled field is initialized"?
Most helpful comment
It appears that the issue is caused by the fact that I called setScaleEnabled inside overridden init() method, which is called before the mScaleXEnabled field is initialized. I moved this logic to onFinishInflate and now it works.