How to set Viewport Range via values at MpAndroidC

2019-08-19 02:31发布

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条回答
Fickle 薄情
2楼-- · 2019-08-19 02:56

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);
查看更多
登录 后发表回答