using --riggid it is possible to get a case where minval is bigger than maxval ....
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Fri, 26 Dec 2003 16:54:55 +0000 (16:54 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Fri, 26 Dec 2003 16:54:55 +0000 (16:54 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@229 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_graph.c

index c60717f..afcbc01 100644 (file)
@@ -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;