# Display value in Gauge node

**URL:** <https://discourse.nodered.org/t/display-value-in-gauge-node/51039>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [15 September 2021 02:12 UTC](https://discourse.nodered.org/t/display-value-in-gauge-node/51039 "2021-09-15T02:12:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfassier](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mfassier/32/48013_2.png) [@mfassier](https://discourse.nodered.org/u/mfassier)\
**Post date:** [15 September 2021 02:12 UTC](https://discourse.nodered.org/t/display-value-in-gauge-node/51039/1 "2021-09-15T02:12:01Z")

</div>

Hello all. I'm having a spot of bother with gauges: I created a dashboard with gauges that work perfectly well, but some do not display the value in text. That is to say, the needle points to the right value, but the gauge has no value displayed in its center.  
I'm no expert at any of this so I might be overlooking something very simple, but I just can't seem to get it to display the value. Any insight is appreciated.  
[image|470x500](https://discourse.nodered.org/uploads/short-url/upuZ0y5dS8XQRCVOQyXSiHyFGq9.png)

```auto
[{"id":"9050d6b3.1b2e88","type":"function","z":"17f58ba3.b32a44","name":"Fetch Temp/RH","func":"msg.topic=\"SELECT MAX(Temp) FROM environment WHERE date >= now() - INTERVAL 1 DAY\";\nmsg.payload=[msg.payload];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":300,"y":720,"wires":[["4bb902a4.a8642c"]]},{"id":"4bb902a4.a8642c","type":"mysql","z":"17f58ba3.b32a44","mydb":"dc5d34f2.4b5a38","name":"","x":490,"y":720,"wires":[["eecd5348.5ee3"]]},{"id":"eecd5348.5ee3","type":"ui_gauge","z":"17f58ba3.b32a44","name":"","group":"4d6914d4.9bd17c","order":3,"width":3,"height":3,"gtype":"gage","title":"Max 24h","label":"°C","format":"{{msg.payload[0].MAX(Temp)}}","min":"-15","max":"35","colors":["#ff0000","#00ff00","#ff0000"],"seg1":"-5","seg2":"25","x":660,"y":720,"wires":[]},{"id":"dc5d34f2.4b5a38","type":"MySQLdatabase","name":"","host":"192.168.2.10","port":"3306","db":"eggs","tz":"UTC","charset":"UTF8"},{"id":"4d6914d4.9bd17c","type":"ui_group","name":"Gauges","tab":"e9a5a1f6.5b716","order":1,"disp":false,"width":"8","collapse":false},{"id":"e9a5a1f6.5b716","type":"ui_tab","name":"Chicken Coop","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)\
**Post date:** [15 September 2021 03:29 UTC](https://discourse.nodered.org/t/display-value-in-gauge-node/51039/2 "2021-09-15T03:29:21Z")

</div>

Have a look to these [gauges](https://discourse.nodered.org/t/first-september-give-away-lets-create-one-gauge/50507) ... they are amazing

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [15 September 2021 04:29 UTC](https://discourse.nodered.org/t/display-value-in-gauge-node/51039/3 "2021-09-15T04:29:07Z")

</div>

Your flow only includes one gauge, and beside can't test with the actual data you are feeding it... but perhaps break the data down in a multi-output function node first, so that each gauge gets a clean integer/float instead of something like `{{msg.payload[0].MAX(Temp)}}`

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [15 September 2021 06:28 UTC](https://discourse.nodered.org/t/display-value-in-gauge-node/51039/4 "2021-09-15T06:28:55Z")

</div>

OK your sql query is giving you a property name that has illegal/non-standard characters in, which is giving the gauge a bad time  
try

```auto
msg.topic="SELECT MAX(Temp) AS maxTemp FROM environment WHERE date >= now() - INTERVAL 1 DAY";

```

then the path would be  
`msg.payload[0].maxTemp`

---

<div class="post-metadata">

**Author:** ![mfassier](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mfassier/32/48013_2.png) [@mfassier](https://discourse.nodered.org/u/mfassier)\
**Post date:** [15 September 2021 13:27 UTC](https://discourse.nodered.org/t/display-value-in-gauge-node/51039/5 "2021-09-15T13:27:08Z")

</div>

Indeed, that's what it was. It threw me off because the gauge "reads" the proper value to display the graphic, but for some reason won't display the actual number. The other thing being that I had tried what you suggested but must have bungled it because it didn't work back then. It's sorted now and the gauge displays both in graphic and in text format. Appreciate the help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 September 2021 13:27 UTC](https://discourse.nodered.org/t/display-value-in-gauge-node/51039/6 "2021-09-29T13:27:56Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
