From 61b78cd6890c539c2931ce94f2b6cac320b2d8c9 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 6 Apr 2010 10:13:54 -0700 Subject: [PATCH] fix a small bug which appeared when a series had a min/max of zero --- dygraph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dygraph.js b/dygraph.js index 1012d76..dc4ff2b 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1565,8 +1565,8 @@ Dygraph.prototype.drawGraph_ = function(data) { var extremes = this.extremeValues_(series); var thisMinY = extremes[0]; var thisMaxY = extremes[1]; - if (!minY || thisMinY < minY) minY = thisMinY; - if (!maxY || thisMaxY > maxY) maxY = thisMaxY; + if (minY === null || thisMinY < minY) minY = thisMinY; + if (maxY === null || thisMaxY > maxY) maxY = thisMaxY; if (bars) { var vals = []; -- 2.7.4