Reputation: 129
First of all, MPAndroidChart is a great Library. I implemented a LineChart and everything went like a breeze. I want to make my LineChart auto scroll to and from to both the extreme points. How can I achieve that?
Upvotes: 0
Views: 342
Reputation: 873
You can use -
chart.moveViewToAnimated(chart.data.entryCount - NUMBER_OF_MONTH_DATA_TO_SHOW, chart.centerOfView.y, chart.axisLeft.axisDependency, 3000);
Upvotes: 0
Reputation: 46
Try this one:
mChart.setVisibleXRangeMaximum(size);
mChart.moveViewToX(valueX);
Upvotes: 1