From 8e48eef771ca7e1f4091845e6c690ad309c46fd8 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Thu, 30 Sep 2010 10:56:40 -0400 Subject: [PATCH] remove old code --- dygraph.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) 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 -- 2.7.4