react-gauge-chart icon indicating copy to clipboard operation
react-gauge-chart copied to clipboard

Remove the rounding when formatTextValue callback is set

Open victor-timofei opened this issue 3 years ago • 2 comments

I think the the floatNumber should not be called at https://github.com/Martin36/react-gauge-chart/blob/de1bba51848f50556663e64a9af9c2546bfe6dea/src/lib/GaugeChart/index.js#L442 and leave the option to the user to round it however he wants with formatTextValue.

victor-timofei avatar Nov 11 '21 11:11 victor-timofei

I agree. I'm working on cleaning this project up and will change this to accept original value. I would prefer to change formatTextValue property to text property that accepts string value instead of function as you should already have percentage value you've passed to the component available. I myself am showing the raw value with units before converted to percentage so the function is even more useless to me. Thoughts @Martin36 ?

bjbrewster avatar Apr 19 '22 06:04 bjbrewster

I agree. I'm working on cleaning this project up and will change this to accept original value. I would prefer to change formatTextValue property to text property that accepts string value instead of function as you should already have percentage value you've passed to the component available. I myself am showing the raw value with units before converted to percentage so the function is even more useless to me. Thoughts @Martin36 ?

I think that sounds great

Martin36 avatar Sep 03 '22 09:09 Martin36