[rrd-users] Stacking at Infinity

Martin Sperl rrdtool at martin.sperl.org
Sun Mar 4 09:19:13 CET 2012


Hi!

What about the following:
	CDEF:CNTUNKN=DS1,UN,1,0,IF,DS2,UN,1,0,IF,+,DS3,UN,1,0,IF,+
	CDEF:TICK1=CNTUNKN,1,EQ,1,UNKN,IF
	CDEF:TICK2=CNTUNKN,2,EQ,1,UNKN,IF
	CDEF:TICK3=CNTUNKN,3,EQ,1,UNKN,IF
	TICK:TICK1#0000FF:-0.03
	TICK:TICK2#00FF00:-0.02
	TICK:TICK3#FF0000:-0.01

(I did not test the CDEF, so they may not be perfect)
Obviouly you could make more cdefs if you even need to know which one is the "bad" one...

You could alsp play with the alpha color channel instead when graphing...

Ciao,
	Martin


On 03.03.2012, at 13:44, Chris Mason wrote:

> Hi,
> 
>> One line at the top (or bottom) of the graph, then stack a suffient amount
>> in the "wrong" direction. I never tried it, but stacking -50M "on top" of
>> 150M should get you at 100M.
> 
> So this works normally when not working at infinity:
> 
> LINE3:1000000#FF0000
> LINE3:-10000#00FF00::STACK
> 
> I assumed the LINE would take into consideration the lines width when
> stacking so I could use -1 as the value. This doesn't seem to work and
> I have to use an actual value but this value would be dependant on the
> scale of the data.
> 
> However, when I draw the first line at INF then it doesn't seem to
> work and have looked into the possibility of achieving the desired
> affect using TICKs as suggested by Martin:
> 
>> I remember that I have done so to highlight times when we have exceeded predictions.
>> You could obviously paint multiple TICKS for different types and paint them with different colors using transparency.
>> As the color (de)coding may be a pain you possibly could draw multiple ticks of different fractions.
> 
> This looks promising and I have used the following to get my desired affect:
> 
> AREA:ifOutDropsH#FF000055
> TICK:DS3#0000FF:-0.03
> TICK:DS2#FF0000:-0.02
> TICK:DS1#00FF00:-0.01
> 
> ** ifOutDrops is INF or NEGINF if drops detected.
> 
> This is so close to what I want to achieve, where each TICK is 1% of
> the Y axis. To get a stacking affect I am overlapping TICKs with the
> bottom one being slightly taller than the next one.
> 
> Now, this works if all classes have drops in, but in most cases they
> don't and it is only a single class which has drops. If it was DS3 and
> DS1 then the DS3 TICK would be visibly 2% tall as opposed to 1%.
> 
> Is it possible to calculate the fraction dynamically depending if I
> have drops in the classes or is there an alternative approach?
> 
> Thanks,
> Chris



More information about the rrd-users mailing list