From: Tobias Oetiker Date: Mon, 14 Mar 2011 08:22:46 +0000 (+0000) Subject: bring spaceing around graph back in line with 1.2 goodness ... in connection with... X-Git-Tag: 1.4.6~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6f59faac1b04f508485d785c7ca75229b58bef8;p=thirdparty%2Frrdtool-1.x.git bring spaceing around graph back in line with 1.2 goodness ... in connection with no-legend and no title git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4/program@2179 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 42823342..341100c4 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -2938,6 +2938,9 @@ int graph_size_location( if (im->second_axis_legend[0] != '\0') { Xvertical2 = im->text_prop[TEXT_PROP_UNIT].size * 2; } + else{ + Xvertical2 = Xspacing; + } if (im->title[0] != '\0') { /* The title is placed "inbetween" two text lines so it @@ -2949,7 +2952,7 @@ int graph_size_location( } else{ // we have no title; get a little clearing from the top - Ytitle = 1.5 * Yspacing; + Ytitle = Yspacing; } if (elements) { @@ -3043,7 +3046,7 @@ int graph_size_location( /* reserve space for padding below the graph */ if (im->extra_flags & NOLEGEND) { - Ymain -= Yspacing; + Ymain -= 0.5*Yspacing; } if (im->watermark[0] != '\0') { @@ -3103,7 +3106,7 @@ int graph_size_location( } /* reserve space for padding below the graph */ if (im->extra_flags & NOLEGEND) { - im->yimg += Yspacing; + im->yimg += 0.5*Yspacing; } if (im->watermark[0] != '\0') {