From: Dan Vanderkam Date: Fri, 27 Nov 2009 16:49:09 +0000 (-0500) Subject: tighten up X-Git-Tag: v1.0.0~874^2~4^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=ceb009dd2d68114c1808c8551ca4c74fe38df5e1;p=dygraphs.git tighten up --- diff --git a/dygraph.js b/dygraph.js index fea3354..da089ce 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1044,12 +1044,8 @@ Dygraph.prototype.drawGraph_ = function(data) { var minAxisY = minY - 0.1 * span; // Try to include zero and make it minAxisY (or maxAxisY) if it makes sense. - if (minAxisY < 0 && minY >= 0) { - minAxisY = 0; - } - if (maxAxisY > 0 && maxY <= 0) { - maxAxisY = 0; - } + if (minAxisY < 0 && minY >= 0) minAxisY = 0; + if (maxAxisY > 0 && maxY <= 0) maxAxisY = 0; if (this.attr_("includeZero")) { if (maxY < 0) maxAxisY = 0;