# UI-Gauge with negative scale shows wrong value

**URL:** <https://discourse.nodered.org/t/ui-gauge-with-negative-scale-shows-wrong-value/85574>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [15 February 2024 18:19 UTC](https://discourse.nodered.org/t/ui-gauge-with-negative-scale-shows-wrong-value/85574 "2024-02-15T18:19:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frida](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frida/32/68250_2.png) [@Frida](https://discourse.nodered.org/u/Frida)\
**Post date:** [15 February 2024 18:19 UTC](https://discourse.nodered.org/t/ui-gauge-with-negative-scale-shows-wrong-value/85574/1 "2024-02-15T18:19:29Z")

</div>

Any one see this. The middle scale shows 0 on the pointer, but the number shows -2.5.  
The other 2 scales show correctly.

 ![pic01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/4/f40bb7f5c06d3166cb0e0e02862858e60a8706e9.png)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [15 February 2024 18:39 UTC](https://discourse.nodered.org/t/ui-gauge-with-negative-scale-shows-wrong-value/85574/2 "2024-02-15T18:39:20Z")

</div>

What is the payload for middle gauge?

---

<div class="post-metadata">

**Author:** ![Frida](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frida/32/68250_2.png) [@Frida](https://discourse.nodered.org/u/Frida)\
**Post date:** [15 February 2024 20:59 UTC](https://discourse.nodered.org/t/ui-gauge-with-negative-scale-shows-wrong-value/85574/3 "2024-02-15T20:59:11Z")

</div>

```auto
[{"id":"73e21dd8bd56e59f","type":"ui-gauge","z":"8e39447b869dbd7c","name":"","group":"e803caf42918a1bf","order":1,"width":0,"height":0,"gtype":"gauge-half","gstyle":"needle","title":"EI","units":"units","prefix":"","suffix":"","segments":[{"from":"-2.5","color":"#ffcc66"},{"from":"-1","color":"#33cc33"},{"from":"1","color":"#ffcc66"}],"min":"-2.5","max":"2.5","sizeThickness":16,"sizeGap":4,"sizeKeyThickness":8,"styleRounded":true,"styleGlow":false,"className":"","x":510,"y":680,"wires":[]},{"id":"ee316ca9eb304757","type":"ui-gauge","z":"8e39447b869dbd7c","name":"","group":"e803caf42918a1bf","order":1,"width":0,"height":0,"gtype":"gauge-half","gstyle":"needle","title":"EI","units":"units","prefix":"","suffix":"","segments":[{"from":"-2.5","color":"#ffcc66"},{"from":"-1","color":"#33cc33"},{"from":"1","color":"#ffcc66"}],"min":"-2.5","max":"2.5","sizeThickness":16,"sizeGap":4,"sizeKeyThickness":8,"styleRounded":true,"styleGlow":false,"className":"","x":510,"y":720,"wires":[]},{"id":"2274c427bfc55a7b","type":"ui-gauge","z":"8e39447b869dbd7c","name":"","group":"e803caf42918a1bf","order":1,"width":0,"height":0,"gtype":"gauge-half","gstyle":"needle","title":"EI","units":"units","prefix":"","suffix":"","segments":[{"from":"-2.5","color":"#ffcc66"},{"from":"-1","color":"#33cc33"},{"from":"1","color":"#ffcc66"}],"min":"-2.5","max":"2.5","sizeThickness":16,"sizeGap":4,"sizeKeyThickness":8,"styleRounded":true,"styleGlow":false,"className":"","x":510,"y":760,"wires":[]},{"id":"d96ca3bbd68181aa","type":"inject","z":"8e39447b869dbd7c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0.0","payloadType":"num","x":190,"y":720,"wires":[["a1d7a0c2cbd9ec7d"]]},{"id":"7a6ec73e0e7f4eec","type":"inject","z":"8e39447b869dbd7c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"-1","payloadType":"num","x":190,"y":800,"wires":[["2274c427bfc55a7b"]]},{"id":"fa69dbf014bc22c0","type":"inject","z":"8e39447b869dbd7c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":190,"y":640,"wires":[["73e21dd8bd56e59f"]]},{"id":"c3efd9f604dcb195","type":"inject","z":"8e39447b869dbd7c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0.0000001","payloadType":"num","x":200,"y":680,"wires":[["a1d7a0c2cbd9ec7d"]]},{"id":"d886a82a1f4dbb57","type":"inject","z":"8e39447b869dbd7c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"-0.0000001","payloadType":"num","x":210,"y":760,"wires":[["a1d7a0c2cbd9ec7d"]]},{"id":"a1d7a0c2cbd9ec7d","type":"junction","z":"8e39447b869dbd7c","x":360,"y":720,"wires":[["ee316ca9eb304757"]]},{"id":"e803caf42918a1bf","type":"ui-group","name":"MyGroup","page":"598e16af8e340f25","width":"3","height":"1","order":-1,"showTitle":true,"className":"","visible":"true","disabled":"false"},{"id":"598e16af8e340f25","type":"ui-page","name":"MyPage","ui":"c7808fa856cdeb06","path":"/page3","icon":"home","layout":"grid","theme":"68d1b11d88c4cd1e","order":2,"className":"","visible":"true","disabled":"false"},{"id":"c7808fa856cdeb06","type":"ui-base","name":"UI Name","path":"/dashboard","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false},{"id":"68d1b11d88c4cd1e","type":"ui-theme","name":"Theme Name","colors":{"surface":"#ffffff","primary":"#0094ce","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]

```

 ![pic02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/b/0bf12a794a94aaabc07e015543f9b4bad8d2d691.png)

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [24 February 2024 15:45 UTC](https://discourse.nodered.org/t/ui-gauge-with-negative-scale-shows-wrong-value/85574/4 "2024-02-24T15:45:57Z")

</div>

Have fixed this with: [UI Gauge: Better zero check & unit label alignment by joepavitt · Pull Request #598 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/pull/598)

---

<div class="post-metadata">

**Author:** ![Frida](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frida/32/68250_2.png) [@Frida](https://discourse.nodered.org/u/Frida)\
**Post date:** [1 March 2024 17:57 UTC](https://discourse.nodered.org/t/ui-gauge-with-negative-scale-shows-wrong-value/85574/5 "2024-03-01T17:57:06Z")

</div>

Afprøvet og virker i version 1.3.0  
Tested and working in version 1.3.0

---

<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:** [15 March 2024 17:57 UTC](https://discourse.nodered.org/t/ui-gauge-with-negative-scale-shows-wrong-value/85574/6 "2024-03-15T17:57:13Z")

</div>

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