I'm using MPAndroidChart
for showing hours of work by day.
Everything is working fine, but I can't figure out how to show integer, not float. For example, if I insert 19 hours in chart, it's showing like this at the top of each chart. Can I show it like 19 h?
Set value formatter, If you set 0 in DefaultValueFormatter it will be shown like integer value example 25, if you set 1 now the output will be 25.0
val barDataSet = BarDataSet(entries, "")
barDataSet.valueFormatter = DefaultValueFormatter(0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With