From: Dan Vanderkam Date: Thu, 30 Sep 2010 14:56:40 +0000 (-0400) Subject: remove old code X-Git-Tag: v1.0.0~622^2~24 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=8e48eef771ca7e1f4091845e6c690ad309c46fd8;p=dygraphs.git remove old code --- diff --git a/dygraph.js b/dygraph.js index a7fe70a..4fb7208 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1700,40 +1700,6 @@ Dygraph.prototype.drawGraph_ = function(data) { this.layout_.updateOptions( { yAxis: axes[0].valueRange, yTicks: axes[0].ticks } ); - // Use some heuristics to come up with a good maxY value, unless it's been - // set explicitly by the user. - /* - var valueRange = this.attr_("valueRange"); - if (valueRange != null) { - this.addYTicks_(valueRange[0], valueRange[1]); - this.displayedYRange_ = valueRange; - } else { - // This affects the calculation of span, below. - if (this.attr_("includeZero") && minY > 0) { - minY = 0; - } - - // Add some padding and round up to an integer to be human-friendly. - var span = maxY - minY; - // special case: if we have no sense of scale, use +/-10% of the sole value. - if (span == 0) { span = maxY; } - var maxAxisY = maxY + 0.1 * span; - 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 (this.attr_("includeZero")) { - if (maxY < 0) maxAxisY = 0; - if (minY > 0) minAxisY = 0; - } - - this.addYTicks_(minAxisY, maxAxisY); - this.displayedYRange_ = [minAxisY, maxAxisY]; - } - */ - this.addXTicks_(); // Tell PlotKit to use this new data and render itself