[rrd-users] Legend alignment problem when more than two lines

alc alc at open.ch
Tue May 10 10:13:38 CEST 2011


Hello,
Since I've upgraded to the new version or RRDtool (1.4.5), I've been having
some problems with the alignment of the legends by using rrdtool graph and
the tab (\t) format.
I'm having this problem when more than 2 lines are displayed.
Here's one example with 3 data sources :

./rrdtool graph test.png \

--start e-1w --end now \
DEF:accept=test.rrd:accept:AVERAGE \
DEF:drop=test.rrd:drop:AVERAGE \
DEF:reject=test.rrd:reject:AVERAGE \

CDEF:test1=accept \
CDEF:test2=drop \
CDEF:test3=reject \

AREA:accept#00FF00:"accept\t":STACK \
GPRINT:test1:LAST:"test1\: %5.2lf \l" \
AREA:drop#FFFF00:"drop\t":STACK \
GPRINT:test2:LAST:"test2\: %5.2lf \l" \
AREA:reject#00FFFF:"reject\t":STACK \
GPRINT:test3:LAST:"test3\: %5.2lf \l"

Resulting graph :

http://rrd-mailinglists.937164.n2.nabble.com/file/n6346957/test.png 
http://rrd-mailinglists.937164.n2.nabble.com/file/n6346957/test.rrd test.rrd 

As you can see, the second line is not aligned (word "test2") with respect
to the first. The only way I could fix this issue is to add some spaces
after the word drop in the line "AREA:drop...", so that all legend words
have the same length. However, according to the documentation, the \t format
should normally do this job. I do have many graphs to update and would love
finding another solution, so that I don't have to manually enter spaces for
each legend.

I've seen such an issue for Cacti ( http://forums.cacti.net/about22506.html
Link here ), but don't know if this is also a bug for rrdtool 1.4.5.

Any idea ?

Thank you,
Alex

--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Legend-alignment-problem-when-more-than-two-lines-tp6346957p6346957.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list