Dashboard Gauge Color Bands ... how are they set?

366 views
Skip to first unread message

Scott C. Lemon

unread,
Oct 23, 2016, 7:29:12 PM10/23/16
to Node-RED
I'm starting to experiment with Node-RED Dashboard ... and so far so good!

I've got some gauges, and I can see that there are three "color bands" - or so it appears - that I can set colors on.  But I'm not seeing how I can set the range for each band?

On a new gauge, I see the Range (which I set to -40 and 125 as the full temperature range) and then I see "Colour gradient" which allows me to set the three colors.

Now how do I set the "range" for each color?  Or ... if I can't ... how are these chosen?  Is it even thirds?

Thanks!

Dave C-J

unread,
Oct 24, 2016, 2:45:20 AM10/24/16
to node...@googlegroups.com

Hi, it's even thirds.

Scott C. Lemon

unread,
Oct 24, 2016, 12:12:08 PM10/24/16
to Node-RED
Is there someplace to post/track a feature request?

It would be nice too allow each color to be associated with a sub-range ...


On Monday, October 24, 2016 at 12:45:20 AM UTC-6, Dave C-J wrote:

Hi, it's even thirds.

Dave C-J

unread,
Oct 24, 2016, 1:41:27 PM10/24/16
to node...@googlegroups.com
Hi 
What sort of thing are you trying to do ? It potentially opens up a whole load of other possible options - especially wrt the config UI that would need a serious amount of effort, compared to all the other stuff people are wanting. It also then starts to make it much harder for us to swap out that library for something else.
(= possible but low priority... but PR considered of course)

Scott C. Lemon

unread,
Oct 25, 2016, 2:28:52 AM10/25/16
to Node-RED
My thought is that you provide a way to set three colors for "thirds" of the gauge.  I am using the gauges now with different ranges based on the sensor, and want to have the "good" vs. "bad" which don't always fall on even thirds.

One possible modification that would accommodate what I'm after is if I could set the "min" and "max" range, and then two intermediary numbers - that must fall within that range - which would delineate the different colored regions.

For example, my temp probe temperature gauge might be set to:

min == -40
max == 125

Then I could set:

colorDivider1 == 65
colorDivider2 == 75

Then my colors might be:

color1 == blue
color 2 == green
color3 == red

Then:

if value < colorDivider1  then color == color1
if colorDivider1 <= value < colorDivider2  then color == color2
if value >= colorDivider2  then color == color3

Something like that ...

My team is finally getting it's head above water, and we might want to look at some things we could do and offer PRs ... but I want to ensure that we learn/understand the code and the vision/direction.

Dave C-J

unread,
Oct 25, 2016, 3:55:16 AM10/25/16
to node...@googlegroups.com
OK
what I would do now is set the gauge to be 55 - 85 (so 65 - 75 was the middle third) - the number on the gauge will show the real value ie -40 to 125 - while the gauge will show it is in the acceptable range.
But yes - always happy to consider PRs.
The vision is that the core Node-RED project is the main focus, the dashboard and other projects are there to back it up and help make it more useful, and to be examples of what you can do with it. 
Reply all
Reply to author
Forward
0 new messages