Mp Android Chart Scrolling The Data From Right To Left
I'm Building a barchart using MpAndroid chart library, i've around 50 - 60 bars and wanted to display the 60th initially i.e. display the last element in the ArrayList and the scro
Solution 1:
This worked for me.
chart.setData(...); // first set data// now modify viewport
chart.setVisibleXRangeMaximum(20); // allow 20 values to be displayed at once on the x-axis, not more
chart.moveViewToX(10); // set the left edge of the chart to x-index 10// moveViewToX(...) also calls invalidate()
Check this for more information, doc
Post a Comment for "Mp Android Chart Scrolling The Data From Right To Left"