From ec40f67c1ddc5f444d7471d386ac9dfb0b91fd46 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Sun, 16 Dec 2012 18:11:31 -0500 Subject: [PATCH] Remove one instance of logscale and all (that is one) instance of includeZero from the Dygraph.axes_ object. --- dygraph.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dygraph.js b/dygraph.js index 9b53729..aefbd19 100644 --- a/dygraph.js +++ b/dygraph.js @@ -2457,7 +2457,6 @@ Dygraph.prototype.computeYAxes_ = function() { // all options which could be applied per-axis: var axisOptions = [ - 'includeZero', 'valueRange', 'labelsKMB', 'labelsKMG2', @@ -2531,7 +2530,8 @@ Dygraph.prototype.computeYAxisRanges_ = function(extremes) { // Compute extreme values, a span and tick marks for each axis. for (var i = 0; i < numAxes; i++) { var axis = this.axes_[i]; - + var logscale = this.attributes_.getForAxis("logscale", i); + var includeZero = this.attributes_.getForAxis("includeZero", i); series = this.attributes_.seriesForAxis(i); if (series.length == 0) { @@ -2557,7 +2557,7 @@ Dygraph.prototype.computeYAxisRanges_ = function(extremes) { maxY = Math.max(extremeMaxY, maxY); } } - if (axis.includeZero && minY > 0) minY = 0; + if (includeZero && minY > 0) minY = 0; // Ensure we have a valid scale, otherwise default to [0, 1] for safety. if (minY == Infinity) minY = 0; @@ -2569,7 +2569,7 @@ Dygraph.prototype.computeYAxisRanges_ = function(extremes) { if (span === 0) { span = maxY; } var maxAxisY, minAxisY; - if (axis.logscale) { + if (logscale) { maxAxisY = maxY + 0.1 * span; minAxisY = minY; } else { -- 2.7.4