From: Dan Vanderkam Date: Tue, 6 Apr 2010 17:13:54 +0000 (-0700) Subject: fix a small bug which appeared when a series had a min/max of zero X-Git-Tag: v1.0.0~697 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=61b78cd6890c539c2931ce94f2b6cac320b2d8c9;p=dygraphs.git fix a small bug which appeared when a series had a min/max of zero --- 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 = [];