From: oetiker Date: Mon, 4 Sep 2006 21:10:55 +0000 (+0000) Subject: in logarithmic mode minval must not be <= 0 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=437147eb1ef8f161b31d234ffb0ef5db9c463678;p=rrdtool.git in logarithmic mode minval must not be <= 0 git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@887 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_graph.c b/src/rrd_graph.c index cd5bdfc..ecf19fd 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1062,8 +1062,9 @@ data_proc( image_desc_t *im ){ ** relevant for min and max */ if (finite(paintval) && im->gdes[ii].gf != GF_TICK ) { - if (isnan(minval) || paintval < minval) - minval = paintval; + if ((isnan(minval) || paintval < minval ) && + ! (im->logarithmic && paintval <= 0.0)) + minval = paintval; if (isnan(maxval) || paintval > maxval) maxval = paintval; }