[rrd-users] (right) alignement in 1.4.2
Tobias Oetiker
tobi at oetiker.ch
Mon Jan 25 23:10:00 CET 2010
Hi Stefan,
Friday Stefan M. Brandl wrote:
> Hello,
> I have the following line in my rrdgraph script:
>
> COMMENT:<sub><i>generated $last</i></sub>\r
>
>
> This is a right-aligned text with the grapg-generation date.
> With rrdtool 1.3.9 it's correct aligned on the right side (see attachement).
> With 1.4.2 the text is nor fully bounded to the right side.
> Can I get the old behavior back?
try this:
--- rrd_graph.c (revision 2005)
+++ rrd_graph.c (working copy)
@@ -1818,7 +1818,7 @@
if (prt_fctn == 'c')
leg_x = (double)(legendwidth - fill) / 2.0;
if (prt_fctn == 'r')
- leg_x = legendwidth - fill - border;
+ leg_x = legendwidth - fill + border;
for (ii = mark; ii <= i; ii++) {
if (im->gdes[ii].legend[0] == '\0')
continue; /* skip empty legends */
cheers
tobi
>
>
> Stefan
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-users
mailing list