I’m working with some donut apex charts, but the value that appears when hovering over the specific section is displayed with too many decimals.
How can I shorten it?
The main problem I’m having is using apex charts docs with this version, as thinger uses some variables like ‘latest’ or ‘labels’ to refer to the widget configuration.
This is my code at the moment:
The decimals come from the floating point format.
It’s a common problem, that you get quasi-infinite number of decimals upon many computed results.
You will find the huge number of decimals in the buckets too.
So I just asked, if you can program the data source freely.
The usual way is to format the data into strings with a definite number of decimals in the data source.
Unfortunately the devices connected to thinger.io are 3rd party. The only way I could change this was to change the dataflow inside node-red.
But then the data bucket would throw an error because I’m trying to write a string into the same bucket where a number used to be. So I would lose all the historical data.
Is there any way to fix the decimals within the widget?