问题
I have dataset values at range [0-10000].
And I want to see range [500-600] at chart with automatically calculated scroll and zoom values.
How it can be done in MPAndroidChart?
Is there any method to setXRange(leftXValue, rightXValue)?
回答1:
First set the max visible range. So if you want to display the range of 500-600, set a max visible range of 100
mChart.setVisibleXRangeMaximum(100);
than you have to move your view so that the values are visible from the 500th position
mChart.moveViewToX(499);
来源:https://stackoverflow.com/questions/46930860/how-to-set-viewport-range-via-values-at-mpandroidchart