[rrd-users] graph stack and negative values
Simon Hobson
linux at thehobsons.co.uk
Fri Jul 1 15:00:29 CEST 2011
Daniele Sluijters wrote:
>Never mind, I just realized my mistake.
>
>Forgot to put a divider line in it at 0, *shame*.
There's an easier, and better, way.
"CDEF:tierin=ds0,4,/",
"AREA:tierin#BFCFE4",
"AREA:tierin#80A0C9::STACK",
"AREA:tierin#4070AE::STACK",
"AREA:tierin#014194::STACK",
"CDEF:tierout=ds1,-4,/",
"AREA:tierout#FCE5BF",
"AREA:tierout#F9CB7F::STACK",
"AREA:tierout#F6B13F::STACK",
"AREA:tierout#F49800::STACK",
Just leave STACK off the first area in each group and it will be
based on the Y=0 line.
Why is this better than adding a line at 0 to stack upon ?
If you do a line at 0, then that draws a line. If your data is
missing, you still get a line unless you go to some trouble to get a
dataset that's 0 when there's data and unknown when there isn't.
Just drawing the data as above, if the data is missing, you'll get a
gap - not a line at 0, a complete break in the data which is what's
normally wanted.
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the rrd-users
mailing list