How can i round the digits of a number?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-06 5:37 AM
Hi,
i am new with node-red functionality and i want to decrease the digits in a Gauge.
When i start the Dashboard i get the temperature in e.g. 21.77615442345 degrees. And i want to show it with 2 digits e.g. 21.78 degrees.
Ho can i do this?
Solved! Go to Solution.
- Labels:
-
STM32CubeMonitor
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-06 6:03 AM
got it... :)
in the Gauge-node (Value format) type in {{value | number:2}}
will round the value by 2 digits.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-06 5:53 AM
What produces the printout. Maybe some format string like %6.3f will help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-06 6:03 AM
got it... :)
in the Gauge-node (Value format) type in {{value | number:2}}
will round the value by 2 digits.
