X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=auto_tests%2Ftests%2Fto_dom_coords.js;h=fb878ca9e2960cb9b14d0151a552ede587b4d096;hb=efd5b117af64cfe0a47f48046a5001f63eb5ca44;hp=98da7c47e6cf7e4f3813853a1ad58d136d969714;hpb=796ccbc0ad1e0e50dbd75e9eb0e109c19efd9524;p=dygraphs.git 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)); +}