If anybody can post a code that can create this particular legend bar I would greatly appreciate it. In addition I would like to know how do I control width and hight of the legend.
Thank you in advance for any response.
FYI here is my MAP

Moderators: Developers, Moderators
check my other post hereHowie wrote:Hmm. I'm not sure if you can. It's also a bug that the box isn't big enough to contain the text...
Absolute scales need some love.
Code: Select all
# exactly 0 is usually bad
SCALE newdefault 0 0 255 0 0
# from black to blue for first 20%
SCALE newdefault 0 20 0 0 0 0 0 255
# from blue to green for 20-40%
SCALE newdefault 20 40 0 0 255 0 255 0
# from green to yellow for 40-60%
SCALE newdefault 40 60 0 255 0 255 255 0
# from yellow to red for 60-80%
SCALE newdefault 60 80 255 255 0 255 0 0
# red for 80%+
SCALE 80 100 255 0 0
I actually ended up doing just that, but got a little more granular. For us, the difference in 1Gbps - 5Gbps is huge, and then as we saturate a 100Gbps link more, that's even more critical to know (visually) what it's doing. But yeah, thanks again for setting me straight on the path. Helped a lot! Got a beautiful, gradient horizontal graph now and about 8 x 100Gbps links all looking awesome in my Weathermap!Howie wrote:Agreed about the spacing - I just meant that if you make a new scale of percentages, then it will apply equally to 1G and 100G, and make one change to the "LINK DEFAULT" section to apply it to any link. With absolute scales, you need to manage it a bit more.
Also, you may not be aware that you can also have gradients in scales, so if you are looking for a gradual change, you don't necessarily need to have a zillion separate SCALE lines.
like this:
Code: Select all
# exactly 0 is usually bad SCALE newdefault 0 0 255 0 0 # from black to blue for first 20% SCALE newdefault 0 20 0 0 0 0 0 255 # from blue to green for 20-40% SCALE newdefault 20 40 0 0 255 0 255 0 # from green to yellow for 40-60% SCALE newdefault 40 60 0 255 0 255 255 0 # from yellow to red for 60-80% SCALE newdefault 60 80 255 255 0 255 0 0 # red for 80%+ SCALE 80 100 255 0 0
Users browsing this forum: No registered users and 1 guest