[rrd-developers] patch to do vertical gradients
tobi at oetiker.ch
Mon Mar 29 17:52:17 CEST 2010
Nov 5 Rian Shelley wrote:
> Somebody on the irc channel suggested that I post this patch here. The
> patch is against rrdtool 1.3.8.
> This adds the GRAD element, which acts more or less like an AREA,
> except you can specify a second color and a height which is used to
> create a gradient from one color to the next.
> I also attached an example graph that uses this patch. The gradients
> in it are generated with these commands:
> GRAD:ips#4444ff:half\\ firewall\\ states
> GRAD:Bin#00cc00#0099441f:0:incoming\\ bandwidth
> The syntax is
> if the second color is missing, it is assumed to be #00000000 and the
> gradientheight defaults to 50
> gradientheight can actually produce 3 kinds of results depending on its value:
> gradientheight > 0
> generates a fixed-height gradient from the data point down. (fire style)
> gradientheight < 0
> generates a fixed-height gradient from the 0 line to the data
> point. (fixed style)
> gradientheight == 0
> generates a gradient that is stretched from the data point to the 0 line.
> this is what the example image is using.
I will be glad to include your patch in trunk, if you provide a patch for the
documentation as well ...
> I would appreciate any comments or suggestions.
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-developers