From c9c13fe504bb9ad8b77582ace30eeafb5a90118b Mon Sep 17 00:00:00 2001 From: oetiker Date: Fri, 26 Dec 2003 16:54:55 +0000 Subject: [PATCH] using --riggid it is possible to get a case where minval is bigger than maxval ... this breaks the horizontal grid ... git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@229 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_graph.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index c60717fa..afcbc014 100644 --- a/program/src/rrd_graph.c +++ b/program/src/rrd_graph.c @@ -1072,6 +1072,11 @@ data_proc( image_desc_t *im ){ else im->maxval = maxval; } + /* make sure min is smaller than max */ + if (im->minval > im->maxval) { + im->minval = 0.99 * im->maxval; + } + /* make sure min and max are not equal */ if (im->minval == im->maxval) { im->maxval *= 1.01; -- 2.30.2