From efd5b117af64cfe0a47f48046a5001f63eb5ca44 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Wed, 26 Dec 2012 19:36:41 -0500 Subject: [PATCH] Remove yAxisLabelWidth from Dygraph.axes_. --- auto_tests/tests/to_dom_coords.js | 20 ++++++++++++++++++++ dygraph.js | 1 - 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/auto_tests/tests/to_dom_coords.js b/auto_tests/tests/to_dom_coords.js index 98da7c4..fb878ca 100644 --- a/auto_tests/tests/to_dom_coords.js +++ b/auto_tests/tests/to_dom_coords.js @@ -121,3 +121,23 @@ ToDomCoordsTestCase.prototype.testChartWithAxesAndLabels = function() { this.checkForInverses(g); } + +ToDomCoordsTestCase.prototype.testYAxisLabelWidth = function() { + var opts = { + yAxisLabelWidth: 100, + axisTickSize: 0, + rightGap: 0, + valueRange: [0, 100], + dateWindow: [0, 100], + width: 500, + height: 500, + } + + var graph = document.getElementById("graph"); + g = new Dygraph(graph, [ [0,0], [100,100] ], opts); + + assertEquals([100, 0], g.toDomCoords(0, 100)); + + g.updateOptions({ yAxisLabelWidth: 50 }); + assertEquals([50, 0], g.toDomCoords(0, 100)); +} diff --git a/dygraph.js b/dygraph.js index 4cee311..e5ec566 100644 --- a/dygraph.js +++ b/dygraph.js @@ -2459,7 +2459,6 @@ Dygraph.prototype.computeYAxes_ = function() { var axisOptions = [ 'valueRange', 'pixelsPerYLabel', - 'yAxisLabelWidth', 'axisLabelFontSize', 'axisTickSize' ]; -- 2.7.4