Skip to content Skip to sidebar Skip to footer

Mpandroidchart Scatterchart In Listview

I am using the MPAndroidChart library. I have multiple scattercharts in a ListView. Every chart contains 365 xvalues (every day of the year). The yvalues vary from 1 to 5. The heig

Solution 1:

This is your issue:

holder.chart.setScaleMinima(3f, 0f);

You are setting the scale value of the y-axis to zero. By doing that, you practically zoom out the chart into infinity. If you do not want to manipulate the zoom/scale of the y-axis, set the y-scale to 1f. Like this:

holder.chart.setScaleMinima(3f, 1f);

Solution 2:

Try to invalidate the chart after centerViewPort, worked for me.

holder.chart.invalidate();

Post a Comment for "Mpandroidchart Scatterchart In Listview"