From 5b0f4666679bbe6a78cd097b8b4a939513579ee0 Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 4 Sep 2006 21:10:55 +0000 Subject: [PATCH] in logarithmic mode minval must not be <= 0 git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@887 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_graph.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index cd5bdfc1..ecf19fd3 100644 --- a/program/src/rrd_graph.c +++ b/program/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; } -- 2.30.2