Displaying units on charts
See original GitHub issueIs your feature request related to a problem? Please describe.
When creating a chart, I would like to be able to specify the unit of the numbers plotted. For example to add the unit °C
to the Y-axis values of a temperature over time chart created with the Time Series Line
chart.
Currently when customising numbers on charts it’s only possible to change the NUMBER FORMAT
or Y/X AXIS FORMAT
, which is limited to features built-in in the d3-format. This formatting doesn’t allow for pre/suffixes. So in my situation I can chose to display 37 or 37.6, but I can’t display 37.6 °C.
Would it be possible to introduce an additional option, which would allow to add a prefix and/or suffix to the numbers on charts? This would be useful for the static numbers and when hovering over the chart, also in most of the current existing charts.
Describe the solution you’d like
Most convenient from my perspective would be to define the unit for specific columns at database level by adding an additional box in the Edit Dataset
pop up (just like it’s already the case for the time dimensions). That would allow to automatically see the pre/sufix without repeating the process on each chart.
Describe alternatives you’ve considered Another solution would be to specify prefix and/or suffix alongside the D3 number formatting. This could be using the same input box, via a syntax like <my_prefix>{actual D3 formatting}<my_suffix> (e.g. {,.2f} °C).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:11 (5 by maintainers)
Top GitHub Comments
@mdeshmu Whilst that technically answers a specific version of this question it’s in no way comparable to Grafana, where pretty much all units you’ll ever need are all present and easily selectable (and you can also add a custom unit if need be).
I want to display bytes (how much size an s3 prefix is using) and now it is misleading when it format it in billion or trillion like 900B or 1.5T which isn’t accurate.