Search code examples
androidpie-chartmpandroidchart

How to set custom float values to y-axis in an MPAndroidChart PieChart


In my application I want to show float data (from JSON) to a y-axis in a pie chart. It is taking the values but converting into percentage values. It not showing my data, it is showing percentage values. How do I show floats?


Solution

  • Comment these lines:

    mChart.setUsePercentValues(false);
    mChart.highlightValues(null);
    
    dataSet.setValueFormatter(new PercentFormatter());