Decimal limit not being applied

@Andrew Sevil

Hi everyone, I have a number widget showing rainfall, which can have a large number of decimals. I have selected the widget to only show 1 decimal, but it doesn’t work. Screenshot below.
Any thoughts?

@Aline Tusi

Hi @sevils,

Can you check if you are sending the data as number or as string?
I’m waiting for your reply.

@Andrew Sevil

Hi @alinetusi, yes it’s coming in as a string. See analysis snippet below.
It seems to work ok with blueprint dashboard, but not a normal…?

@Aline Tusi

Hi @sevils,

The Display widget respect the type of data.
This means that it will respect the data separator, in this case, the data type is number.
e.g.



\[  
{  
“variable”: “temperature”,  
“value”: 71.999999  
}  
\]


If you send data as a string, it won’t respect the separator.



71.99999 = number  
“71.99999”= string


To fix it, I suggest you change the data type to number.

@Andrew Sevil

Ok, thanks @alinetusi I’ll make the change and check the result. Interesting that it works ok for the blueprint dashboard though…

@Andrew Sevil

Works fine, thank you!