开发者

RRDTool legend label placement

开发者 https://www.devze.com 2023-02-06 23:00 出处:网络
My titles in the right column are in the wrong place. Can anyone help me to correct? rrdtool graph ... \\

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

rrdtool graph ... \
COMMENT:'   ' \  
"LINE1:kliensek#0000FF:Cs开发者_JAVA百科atlakozott 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.


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


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"
0

精彩评论

暂无评论...
验证码 换一张
取 消