Search code examples
ios-charts

Rounded values in iOS-charts


I'm using ios-chart library, when I set this:

set1.drawValuesEnabled = true

in LineChartDataSet, my values are rounded as Int value (Example: 5.4 to 5)

This happen only when a get the values from api service, I convert the values of my array from String to Double

I'm printing the values before I assign to dataset and the values are correct. I don't want rounded values

Thanks for any help


Solution

  • use custom valueFormatter in dataSet objects.