From: Neal Nelson Date: Fri, 8 Oct 2010 12:08:49 +0000 (+0200) Subject: Ignore data series' with null data for the purposes of auto scaling. X-Git-Tag: v1.0.0~636^2~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=af4cad8b49bb40b7f334f0cbafc77eef87438bd3;p=dygraphs.git Ignore data series' with null data for the purposes of auto scaling. --- diff --git a/dygraph.js b/dygraph.js index 8d171e3..98d297a 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1666,8 +1666,8 @@ Dygraph.prototype.drawGraph_ = function(data) { var extremes = this.extremeValues_(series); var thisMinY = extremes[0]; var thisMaxY = extremes[1]; - if (minY === null || thisMinY < minY) minY = thisMinY; - if (maxY === null || thisMaxY > maxY) maxY = thisMaxY; + if (minY === null || (thisMinY != null && thisMinY < minY)) minY = thisMinY; + if (maxY === null || (thisMaxY != null && thisMaxY > maxY)) maxY = thisMaxY; if (bars) { for (var j=0; j