Closed MarcelJurtz closed 2 years ago
@MarcelJurtz Yes. There are APIs for formatting labels of x or y axises.
In your case, you may do like this:
BarChart(
barChartData = barChartDataModel.barChartData,
labelDrawer = barChartDataModel.labelDrawer,
yAxisDrawer = SimpleYAxisDrawer(labelValueFormatter = { value ->
"your regex here".format(
value
)
})
)
Thank you! I'll give that a try later.
Edit: Worked out for me. Thanks!
I would like to replace the labels on the y-axis in a bar diagram while keeping the original structure. In my use case, I display an amount of time per day of week, which is currently displayed in minutes, but I'd like to change the format to something like 2:30 instead of 150. Is there an option for that?