MPAndroidChart
MPAndroidChart copied to clipboard
cannot reset zoom

barChart.resetZoom(); not works so i cannot see x Axis as seen on the picture.
what should i do
chart.fitScreen(); This func can reset zoom. /** * Resets all zooming and dragging and makes the chart fit exactly it's * bounds. */ public void fitScreen() { Matrix save = mFitScreenMatrixBuffer; mViewPortHandler.fitScreen(save); mViewPortHandler.refresh(save, this, false);
calculateOffsets();
postInvalidate();
}
barChart.post {
fitScreen()
centerViewTo(0f, 0f, YAxis.AxisDependency.LEFT)
invalidate()
}
This will work. I guess this has something to do how the chart renders and the render cycle of the view.