palerdot / react-d3-speedometer

React Speedometer component using d3.js ⚛️
https://palerdot.in/react-d3-speedometer/
MIT License
230 stars 57 forks source link

how can i give a unit/prefix/suffix to the segment label value ? #151 #152

Closed kennyma-eplus closed 1 year ago

kennyma-eplus commented 1 year ago

@palerdot since i have no privileges to re-open the issue, i open a new issue again

151

i added comment on it

please take a look

palerdot commented 1 year ago

Ok. A valueFormatter prop is needed which should take a function and allow user to customize the value like

valueFormatter={value => value + `%`}
kennyma-eplus commented 1 year ago

yeah, that would be great

palerdot commented 1 year ago

segmentValueFormatter is introduced to customize segment values. This is available in following versions

Reference links

Please reopen this issue in case of any problems.