ComposeCharts icon indicating copy to clipboard operation
ComposeCharts copied to clipboard

Custom dot or bar value labels.

Open waqar-ahmed opened this issue 1 year ago • 3 comments

Hi, currently the displayed value for the bar or dot on the graph is the plotted value. The only way to customize this at the moment is by using ContentBuilder, which simply adds a suffix to the value: image

I want to specify custom labels for dots or bars. For example, if I'm plotting time in minutes or hours, I’d like to display the labels as 2 hrs 5 mins instead of 125.0. Is there any way to achieve this customization?

Thank you.

waqar-ahmed avatar Oct 03 '24 18:10 waqar-ahmed

Hi @waqar-ahmed , whats your data list type? are you using minute values for chart data?

ehsannarmani avatar Oct 03 '24 18:10 ehsannarmani

Hi @waqar-ahmed , whats your data list type? are you using minute values for chart data?

Hi, thank you for reply. Since, I can only pass double values, I am passing in minutes (as double value) as data list. But 120 mins is not so understandable compared to 2 hrs.

waqar-ahmed avatar Oct 06 '24 15:10 waqar-ahmed

@waqar-ahmed , that content builder gives you the value, you can convert that to time, for example in your case, the given value in content builder function is minutes, you should convert minutes to readable time.

ehsannarmani avatar Oct 09 '24 11:10 ehsannarmani