Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In MPAndroidChart negative values are not displayed on chart coordinates

Using MPAndroidChart i tried to make following two charts. Following images are self explanatory: one is when y-axis is positive and other when it is negative(here the values of the chart aren't visible): Positive Axis Chart Negative Axis Chart

like image 960
Anonymous Avatar asked Oct 18 '25 13:10

Anonymous


1 Answers

keep below code in Main thread where you initialized the chart. It will work fine.

    chart.getAxisLeft().setStartAtZero(false);
    chart2.getAxisRight().setStartAtZero(false);
like image 181
Kundan Avatar answered Oct 22 '25 05:10

Kundan