Hey Toby, Hmmmm, I've looked through the docs and every rrd mailing list for any mention of legend alignment, legend, align, not align, justify. Would you consider adding the ability to disable this left/right justify feature, as I'm confident that it is the cause.
Or, just for consistency, how about not reassigning the glue value to 0 when you're on the last line's legends. Shouldn't break anything. Here is an example of my problem. One from the current rrd_tool.1.0.40, and the other with the patch below applied. http://qosient.com/argus/rrdtool.1.0.40.gif http://qosient.com/argus/rrdtool.1.0.40.mod.gif Hopefully you'll see my problem? Carter *** rrd_graph.c.orig Thu Dec 12 19:50:10 2002 --- rrd_graph.c Fri Dec 13 08:34:06 2002 *************** *** 1723,1729 **** glue = (im->xgif - fill - 2* border) / (leg_c-1); /* if (glue > 2 * SmallFont->w) glue = 0; */ } else { - glue = 0; } if (prt_fctn =='c') leg_x = (im->xgif - fill) / 2.0; if (prt_fctn =='r') leg_x = im->xgif - fill - border; --- 1723,1728 ---- > -----Original Message----- > From: Tobias Oetiker [mailto:[EMAIL PROTECTED] > Sent: Friday, December 13, 2002 1:55 AM > To: Carter Bullard > Cc: [EMAIL PROTECTED] > Subject: Re: [rrd-developers] legend spacing problems > > > Yesterday Carter Bullard wrote: > > > > > Gentle people, > > New to the list so sorry for any intrusion. I was > > having problems trying to get the last line of legends > > to align when I had a lot of objects to graph. My problem > > is solved by removing the "glue" spacing, which adds a > variable fudge > > to the interlegend spacing on each line. > > > > I'm not sure of the history of this glue spacing, is > > it possible to remove it, or put a switch around it? > > I'm suggesting removal, with the modification below. > > > > Any opinion is, of course, very welcome! > > > > Carter > > > > > > *** rrd_graph.c.orig Thu Dec 12 19:50:10 2002 > > --- rrd_graph.c Thu Dec 12 19:50:54 2002 > > *************** > > *** 1719,1730 **** > > > > if (prt_fctn != '\0'){ > > leg_x = border; > > - if (leg_c >= 2 && prt_fctn == 'j') { > > - glue = (im->xgif - fill - 2* border) / (leg_c-1); > > - /* if (glue > 2 * SmallFont->w) glue = 0; */ > > - } else { > > - glue = 0; > > - } > > if (prt_fctn =='c') leg_x = (im->xgif - fill) / 2.0; > > if (prt_fctn =='r') leg_x = im->xgif - fill - border; > > the glue is for justifying text ... so that it becomes left > and right aligned ... this is a feature ... when you want > your legends to be aligned differently break them by hand ... > check the docs > > tobi > > > > --- 1719,1724 ---- > > > > > > -- > > Unsubscribe > mailto:[EMAIL PROTECTED] ibe > Help mailto:[EMAIL PROTECTED] > Archive http://www.ee.ethz.ch/~slist/rrd-developers > WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi > -- ______ __ _ /_ __/_ / / (_) Oetiker, ETZ J97, ETH, CH-8092 Zurich, Switzerland / // _ \/ _ \/ / System Manager Coach Time Lord Developer Designer /_/ \.__/_.__/_/ http://people.ee.ethz.ch/~oetiker +41(0)1-632-5286 -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-developers WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
