From: Robert Konigsberg Date: Thu, 27 Dec 2012 00:36:41 +0000 (-0500) Subject: Remove yAxisLabelWidth from Dygraph.axes_. X-Git-Tag: v1.0.0~138^2~6 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=efd5b117af64cfe0a47f48046a5001f63eb5ca44;p=dygraphs.git Remove yAxisLabelWidth from Dygraph.axes_. --- 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' ];