From: oetiker Date: Fri, 1 Jun 2007 17:59:25 +0000 (+0000) Subject: --full-size-mode with and without --no-legend should work now -- Matthew Chambers X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=commitdiff_plain;h=be7a55473565ee9d2bd83f5be70d08dbb9550eb3 --full-size-mode with and without --no-legend should work now -- Matthew Chambers git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1099 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 191404e..f9c7a11 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -2710,11 +2710,19 @@ int graph_size_location( ** of the legend and the axis labels. */ - /* Determine where to place the legends onto the image. - ** Set Ymain and adjust im->yorigin to match the space requirements. - */ - if (leg_place(im, &Ymain) == -1) - return -1; + if (im->extra_flags & NOLEGEND) + { + /* set dimensions correctly if using full size mode with no legend */ + im->yorigin = im->yimg - im->text_prop[TEXT_PROP_AXIS].size * 2.5 - Yspacing; + Ymain = im->yorigin; + } else + { + /* Determine where to place the legends onto the image. + ** Set Ymain and adjust im->yorigin to match the space requirements. + */ + if (leg_place(im, &Ymain) == -1) + return -1; + } #ifdef WITH_PIECHART /* if (im->yimg < Ypie) im->yimg = Ypie; * not sure what do about this */