[rrd-users] Text formatting

Simon Hobson linux at thehobsons.co.uk
Mon Dec 6 12:45:05 CET 2010

Tobias Oetiker wrote:

>there were alignement issues with rrdtool a few releases back ...
>it should work in 1.4.4 ...

I'll wait for a newer version to make it's way into the Debian 
packages then - it's only a minor thing.

>you may want to look at using tabs also

Didn't seem to make any difference for me, but I'll have another look.

Next question on tabs, on 
http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html is syas :
>When using a proportional font in your graph, the tab characters or 
>the sequence \t will line-up legend elements. Note that the tabs 
>inserted are relative to the start of the current legend element!

What I want is to get a legend like this :

Main   * xxx.xx  xxx.xx   * xxx.xx  xxx.xx
Backup * xxx.xx  xxx.xx   * xxx.xx  xxx.xx
Total    xxx.xx             xxx.xx

Where the "*"s represent the colour patches printed when a legend 
string is given to an AREA command. Note that the third line does NOT 
have the colour patches. I'm getting that from the following commands 

COMMENT:"Main  "
AREA:In1:" "
AREA:Out1:" "


COMMENT:"Total     "
GPRINT:TotalIn:"...        "

As I read that comment from the manual, it sounds like tabs are only 
dealt with relative to the current bit of text I'm trying to lay 
down, not to the line. So putting a tab after "Total" can line up the 
end of the first bit of text, but I can't use tabs to take care of 
the space taken by the colour blobs. So I'm still using spaces for 
lining stuff up.
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