From 80fc2a685ec99e79f1b9561ff29899bf5887079b Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 23 Mar 2002 20:41:48 +0000 Subject: [PATCH] Better positioning of the pie when it is alone on the canvas git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@105 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_graph.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index 7908ad45..8b9e679f 100644 --- a/program/src/rrd_graph.c +++ b/program/src/rrd_graph.c @@ -2054,8 +2054,13 @@ graph_size_location(image_desc_t *im, int elements, int piechart ) ** just below the title (if any) and with sufficient ** padding. */ - im->pie_x = im->xgif - Xspacing - Xpie/2; - im->pie_y = im->yorigin-Ymain+Ypie/2; + if (elements) { + im->pie_x = im->xgif - Xspacing - Xpie/2; + im->pie_y = im->yorigin-Ymain+Ypie/2; + } else { + im->pie_x = im->xgif/2; + im->pie_y = im->yorigin-Ypie/2; + } return 0; } -- 2.30.2