Adrian
Adrian

Reputation: 2656

RRDTool legend label placement

My titles in the right column are in the wrong place. Can anyone help me to correct?

rrdtool graph ... \
COMMENT:'   ' \  
"LINE1:kliensek#0000FF:Csatlakozott kliensek száma" \  
COMMENT:'           ' \  
"LINE2:aktivkliensek#99FF00:Aktív kliensek száma" \  
COMMENT:"\n" \  
GPRINT:kliensek:LAST:"    Legutóbbi\:%7.0lf%s" \  
COMMENT:"                    " \  
GPRINT:aktivkliensek:LAST:"Legutóbbi\:%7.0lf%s\n" \  
GPRINT:kliensek:MIN:"     Minimum\:%9.0lf%s" \  
COMMENT:"             " \  
GPRINT:kliensek:MIN:"     Minimum\:%9.0lf%s\n" \  
GPRINT:kliensek:MAX:"     Maximum\:%9.0lf%s" \  
GPRINT:aktivkliensek:MAX:"Maximum\:%9.0lf%s"      

I can't position the last title in the right column to the left.

GPRINT:aktivkliensek:MAX:"Maximum\:%9.0lf%s"

Also in the right column, the first title

PRINT:kliensek:LAST:"     Legutóbbi\:%7.0lf%s"

is at the wrong place by 1 pixel. The minimum title only is OK.

Upvotes: 1

Views: 6222

Answers (2)

Tobi Oetiker
Tobi Oetiker

Reputation: 5460

You could also use tabs and maybe switch to a more tabular presentation

                avg      min     max
   Line A        22       10      24
   Line B        23        8      30

Hope this helps

Upvotes: 1

gorthx
gorthx

Reputation: 321

Here are some things to try:

  1. Add a newline (\n) at the end of your last line.
  2. Remove the space from the beginning of your second "Minimum" label.
  3. You have a line: COMMENT:' ' between the two LAST and two MIN statements; add that between your two MAX statements too (or get rid of it altogether)
  4. Not related to the formatting - You have two entries for "kliensek:MIN" - is that intentional?

So you should have:

GPRINT:kliensek:LAST:" Legutóbbi\:%7.0lf%s" \
COMMENT:" " \
GPRINT:aktivkliensek:LAST:"Legutóbbi\:%7.0lf%s\n" \
GPRINT:kliensek:MIN:" Minimum\:%9.0lf%s" \
COMMENT:" " \
GPRINT:aktivkliensek:MIN:"Minimum\:%9.0lf%s\n" \
GPRINT:kliensek:MAX:" Maximum\:%9.0lf%s" \
COMMENT:" " \
GPRINT:aktivkliensek:MAX:"Maximum\:%9.0lf%s\n"

Upvotes: 0

Related Questions