# \[Artless Gauge Features\] I need second (and third...) opinion

**URL:** <https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361>\
**Category:** Dashboard\
**Created:** [23 April 2020 12:18 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361 "2020-04-23T12:18:45Z")\
**Posts on this page:** 20\
**Page:** 2

<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:** [1 May 2020 13:48 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/21 "2020-05-01T13:48:03Z")

</div>

> [@Paul-Reed](#):
>
> Is that because you've used a larger font size for the value (1.6em) than the font size of the Label (1.2em)

I know 🙂 Value is bigger to stand out. And if the unit will be positioned as suffix it will be again smaller. But the default configuration has the unit under the line. It is if you don't show the min and max. So the unit moves around a lot currently with different configurations and even I dont like it cos it is confusing. And there is no way the user can make decisions.

And this is where I can make changes. But I think it would be nice to have more input in terms of what is expected. As it involves that many possible layout variations, I have no clue what to ask to get the answers I need 😃

---

<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:** [2 May 2020 14:42 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/22 "2020-05-02T14:42:29Z")

</div>

Without need to add another config option I can do this.  
To show **min** , **center** , **max** and the **unit** with linear layout in differential mode  
And this is what I call graphically unbalanced layout.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/1/d193acf08b54fda0941a666f7f9068eabc1bdeac.png)

Feedback is very welcome 🙂

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [2 May 2020 15:09 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/23 "2020-05-02T15:09:39Z")

</div>

What size is the unit, it looks smaller than the Label size (1.2em). Would it be more balanced if they were the same size.

---

<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:** [2 May 2020 15:13 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/24 "2020-05-02T15:13:10Z")

</div>

With same size as label

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/4/841d81ae7c59c4758356b3cdeda56245817b09f5.png)

Icon helps a bit I'd guess ...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/1/312908627c2fcd0b3c4fd442a1c42fceb342739b.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:** [2 May 2020 15:37 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/25 "2020-05-02T15:37:51Z")

</div>

All possible linear layout combinations (without icon)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/73d72d8603df98604bd42232155a55b20ddc8b19.png)

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [2 May 2020 16:03 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/26 "2020-05-02T16:03:24Z")

</div>

The bottom version gets my vote, although your example looks very unfamiliar with the 'center' point being set at 5.35, and the chart then travelling backwards (my brain can't comprehend!!)  
A more familiar view would be (as others have also said) something like; scale = -3000 to +5000 and the center point at 0, then I think that would look OK.

Hopefully, you'll get some some more user feedback.

---

<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:** [2 May 2020 16:05 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/27 "2020-05-02T16:05:09Z")

</div>

I was just testing a bug (center value was forced to nearest integer)  
But I think it would be nice if it looks good in any condition.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 May 2020 16:46 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/28 "2020-05-02T16:46:12Z")

</div>

agree - prefer the bottom one (so far 🙂 )  
and the top one for minimalist

---

<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:** [2 May 2020 17:01 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/29 "2020-05-02T17:01:39Z")

</div>

They all are possible. Except the bottom one for today. The question was where to put the unit field in case of all other things also turned in. And the font size for it.  
The other question may come for example 4 (non differential) where center is used for unit. Should it be also moved to be value suffix

Or the unit should always be as suffix and never under the line?

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [2 May 2020 18:25 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/30 "2020-05-02T18:25:52Z")

</div>

> [@hotNipi](#):
>
> I was just testing a bug (center value was forced to nearest integer)

I noticed that the input number also is forced to the nearest integer.

I decided last night that it would be a good idea if when displaying power (Watts), that if the value was \>1000 (Watts), then divide it by 1000 and display it in kW instead, and change the unit from W to kW, and the scale using msg.control.  
So 4586W was displayed as 4.586kW (probably rounded to 4.58kW)  
But after writing it up in a function node & hooking it up to a gauge I realized that it just displayed the integer 4.

It's not a problem though, as it was probably not a good idea anyway, especially when the reading fluctuates around 1000W, causing it to keep changing from W to kW 🤔

---

<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:** [2 May 2020 18:40 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/31 "2020-05-02T18:40:40Z")

</div>

That will be scientific-gauge with scale sensitive ranges depended on measured unit. Bits and bytes and such stuff supported. 😉

---

<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:** [3 May 2020 05:59 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/32 "2020-05-03T05:59:44Z")

</div>

**V0.1.29**

- (Changed) With linear layout, the unit field is at value suffix position if min/max also shown.

- (Fixed) Center value can be any number (was forced to integer).

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [3 May 2020 08:50 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/33 "2020-05-03T08:50:13Z")

</div>

> [@hotNipi](#):
>
> (Fixed) Center value can be any number (was forced to integer).

If the input number is still being forced to integer, what's the point in not enforcing the same action for the center value.

---

<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:** [3 May 2020 08:53 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/34 "2020-05-03T08:53:35Z")

</div>

Where it forced? Or I'm missing something here...

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [3 May 2020 09:01 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/35 "2020-05-03T09:01:20Z")

</div>

As per the example that I gave above. if you feed a number into the node with let's say 2 decimal places, the node displays its value as a integer.

> [@Paul-Reed](#):
>
> I noticed that the input number also is forced to the nearest integer

---

<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:** [3 May 2020 09:06 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/36 "2020-05-03T09:06:18Z")

</div>

That is when you have configuration made so. Default for decimals is zero. So then it will be integer.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/9/b9ccaccf4eb0d6d3fec14eff364392e7b3fab465.png)

Probably again I have problems with describing how the features work. 🥴

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [3 May 2020 09:10 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/37 "2020-05-03T09:10:54Z")

</div>

> [@hotNipi](#):
>
> Probably again I have problems with describing how the features work.

No, your description is good.  
I completely missed that for some reason.  
No excuses, I should have seen it 🤓

---

<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:** [3 May 2020 09:11 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/38 "2020-05-03T09:11:48Z")

</div>

Maybe it is just at wrong place on configuration page. Too easy to miss.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [3 May 2020 15:00 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/39 "2020-05-03T15:00:43Z")

</div>

> [@hotNipi](#):
>
> That is when you have configuration made so. Default for decimals is zero. So then it will be integer.

Is this available to set at runtime, for example when changing the units from watts to kilowatts at runtime, you would need the data to 2 or 3 decimal places for kW, but as a integer for W.

Also I'm getting some strange results when using the runtime, the 2500 & -2500 injects don't present the chart as I expected.

```auto
[{"id":"8ce3e563.1a0968","type":"inject","z":"c9c4eeb8.bad8e","name":"","topic":"","payload":"999","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":2010,"wires":[["cc8e556.23e4ea8"]]},{"id":"cc8e556.23e4ea8","type":"function","z":"c9c4eeb8.bad8e","name":"","func":"let val=msg.payload;\nlet Wsectors = [{t:\"min\",val:-3000,col:\"#00ff00\",dot:0},{t:\"sec\",val:0,col:\"#ff0000\",dot:3},{t:\"max\",val:5000,col:\"#0000ff\",dot:0}];\nlet kWsectors = [{t:\"min\",val:-3,col:\"#00ff00\",dot:0},{t:\"sec\",val:0,col:\"#ff0000\",dot:3},{t:\"max\",val:5,col:\"#0000ff\",dot:0}];\nvar newSectors,unit;\n\nif (val >= 1000 || val <= -1000){\n msg.payload=val/1000;\n newSectors=kWsectors;\n unit=\"kiloWatt\";\n} else {\n newSectors=Wsectors;\n unit=\"Watt\";\n}\nmsg.control = {unit:unit,label:\"Grid Activity\",icon:\"fa-plug\",sectors:newSectors};\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":2070,"wires":[["c5a5348b.574418","6a81ae9c.deb0d"]]},{"id":"c5a5348b.574418","type":"debug","z":"c9c4eeb8.bad8e","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":460,"y":2100,"wires":[]},{"id":"3e3ee7ef.686678","type":"inject","z":"c9c4eeb8.bad8e","name":"","topic":"","payload":"-999","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":2090,"wires":[["cc8e556.23e4ea8"]]},{"id":"2444bdc0.99e172","type":"inject","z":"c9c4eeb8.bad8e","name":"","topic":"","payload":"2500","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":2050,"wires":[["cc8e556.23e4ea8"]]},{"id":"e19836.36bd07c8","type":"inject","z":"c9c4eeb8.bad8e","name":"","topic":"","payload":"-2500","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":2130,"wires":[["cc8e556.23e4ea8"]]},{"id":"6a81ae9c.deb0d","type":"ui_artlessgauge","z":"c9c4eeb8.bad8e","group":"61d2dced.3db8f4","order":18,"width":3,"height":3,"name":"","icon":"","label":"Gauge","unit":"","layout":"radial","decimals":"2","differential":true,"minmax":true,"colorTrack":"#555555","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#ff9900","t":"min","dot":0},{"val":10,"col":"#ff9900","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"0","x":490,"y":2040,"wires":[]},{"id":"61d2dced.3db8f4","type":"ui_group","z":0,"name":"flowtest","tab":"3c94630c.13381c","order":1,"disp":true,"width":16,"collapse":false},{"id":"3c94630c.13381c","type":"ui_tab","z":0,"name":"Test","icon":"dashboard","order":9}]

```

---

<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:** [3 May 2020 15:33 UTC](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361/40 "2020-05-03T15:33:39Z")

</div>

It's not working. But it will 😛

[Previous page](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361.md?page=1)

[Next page](https://discourse.nodered.org/t/artless-gauge-features-i-need-second-and-third-opinion/25361.md?page=3)
