Gauge indications for negativ to positiv value range

I would like to display the charge/discharge power of my solar battery with a gauge or donut.
To configure the gauge or donut is easy, but what is not working very well is the colouring.

As example for a value range of -3000 to +3000 I would like to have no colouring if value is 0, green from 0 to the actual positiv value and red from 0 to the actual negativ value.
For a donut, I would like to have 0 on top (12 o'clock) and also here same colouring already described. Now 0 is at the bottom (6 o'clock) and colouring always starts at -3000.

How is it possible to achieve this behaviour?

the simple gauge can be set as you desire

[{"id":"7f3d3f5e.cf73","type":"ui_slider","z":"ea593186.4918d","name":"","label":"slider","tooltip":"","group":"b10fbc0c.f705c","order":1,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":"-3000","max":"3000","step":"10","x":350,"y":60,"wires":[["866e68bc.d7af18","92b740aa.37a4e"]]},{"id":"866e68bc.d7af18","type":"ui_gauge","z":"ea593186.4918d","name":"","group":"b10fbc0c.f705c","order":2,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":"-3000","max":"3000","colors":["#ce0705","#505050","#01ca03"],"seg1":"-1","seg2":"1","x":590,"y":60,"wires":[]},{"id":"b10fbc0c.f705c","type":"ui_group","z":"","name":"Home","tab":"76d6a090.f21d2","disp":false,"width":"6","collapse":false},{"id":"76d6a090.f21d2","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

the donut does always start from the top - though that could be a nice option to add.

This is not possible with regular gauge.
One and only gauge which has differential mode is node-red-contrib-ui-artless-gauge

image

Of course it has different graphics and may not suit for your needs. If so, there is not much more options than you'll need to use some other JavaScript library for gauge where differential option is supported.

1 Like

Thanks for your example. It is exactly how I did it, but as you can see, colouring always starts at the lowest value.
Bildschirmfoto 2020-04-08 um 12.15.50

Thanks a lot for the tip to use artless-gauge. I will give it a try.

And it may end up in default gauge one day - https://github.com/toorshia/justgage/issues/345

That's exactly what I'm looking for. But it's sad, that there seems to be no progress until now.

There was already a discussion about it, which I didn't found during my search:
https://discourse.nodered.org/t/differential-gauge-node-a-proposal-for-a-new-appearance/21449/6

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