You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Charts for displaying money data that is stored as NSDecimalNumber. Then I convert it to double and pass to the Charts. For vertical axis I use my own value formatter that convert 1000 to 1.00k 1000,000 to 1.00m etc. And it works with NSDecimalNumber for better accuracy. The problem occurs with big values (around 9 billion). In stringForValue of my custom IChartAxisValueFormatter I got value as 5,999,999,999.999,999 instead of 6,000,000,000. Then it's converted to NSDecimalNumber and I got 5.99b instead of 6.00b.
Is it possible to change axis entries to NSDecimalNumber? Or use something like LargeValueFormatter from MPAndroidChart
The text was updated successfully, but these errors were encountered:
The axis values are just Double and make perfect sense. It's up to you what to format into. You can try search any available formatter can do the job. But I used to write a simple large value formatter as well ( 10k, 100M, etc).
Hi,
I use Charts for displaying money data that is stored as NSDecimalNumber. Then I convert it to double and pass to the Charts. For vertical axis I use my own value formatter that convert 1000 to 1.00k 1000,000 to 1.00m etc. And it works with NSDecimalNumber for better accuracy. The problem occurs with big values (around 9 billion). In stringForValue of my custom IChartAxisValueFormatter I got value as 5,999,999,999.999,999 instead of 6,000,000,000. Then it's converted to NSDecimalNumber and I got 5.99b instead of 6.00b.
Is it possible to change axis entries to NSDecimalNumber? Or use something like LargeValueFormatter from MPAndroidChart
The text was updated successfully, but these errors were encountered: