inesmoskal opened a new issue #16610:
URL: https://github.com/apache/superset/issues/16610


   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](https://github.com/d3/d3-format/issues/121). 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.
   
   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. 
   
   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).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to