Reputation: 794
I'm using MPAndroidChart library in my project. A CombinedChart will be filled with data provided by the user, so it is sensitive to grow too much and make the visualization of the chart not so friendly.
So I would like to set a initial maximum of entries to display and then make the user capable of scrolling horizontally to see more entries.
I saw in MPAndroidChart Example that after pinching zoom, the user can scroll anywhere so I pressume that my need could be fulfill with this powerfull library
Upvotes: 0
Views: 559
Reputation: 794
Well, it's not what i had in mind but these settings do the trick:
CombinedChart mChart;
mChart = (CombinedChart) findViewById(R.id.mchart);
mChart.setScaleMinima(100f, 1f); // The total number of entries will be divided by these factors
mChart.centerViewTo(lastXvalue, lastYValue, YAxis.AxisDependency.RIGHT); //This centers the view on the last value
Upvotes: 2