X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Frange_selector.js;fp=auto_tests%2Ftests%2Frange_selector.js;h=29a6709a84f8d7b3a32b17adf2f9d01ff8465745;hb=b77d7a56cdc26a9846d6d6fa008974be4c0564e9;hp=a145d7a2c7a055df3bbe2689d0413b3a25a394db;hpb=710ac67ad54c012c5e6b53b5e9f4bbe5e3c0b1df;p=dygraphs.git diff --git a/auto_tests/tests/range_selector.js b/auto_tests/tests/range_selector.js index a145d7a..29a6709 100644 --- a/auto_tests/tests/range_selector.js +++ b/auto_tests/tests/range_selector.js @@ -133,6 +133,37 @@ RangeSelectorTestCase.prototype.testRangeSelectorOptions = function() { this.assertGraphExistence(g, graph); }; +RangeSelectorTestCase.prototype.testAdditionalRangeSelectorOptions = function() { + var opts = { + width: 480, + height: 320, + showRangeSelector: true, + rangeSelectorHeight: 30, + rangeSelectorBGStrokeColor: 'blue', + rangeSelectorBGLineWidth: 3, + rangeSelectorPlotLineWidth: 0.5, + rangeSelectorPlotGradientColor: 'gray', + rangeSelectorFGStrokeColor: 'red', + rangeSelectorFGLineWidth: 2, + rangeSelectorAlpha: 0.8, + labels: ['X', 'Y'] + }; + var data = [ + [1, 10], + [2, 15], + [3, 10], + [4, 15], + [5, 10], + [6, 15], + [7, 10], + [8, 15], + [9, 10] + ]; + var graph = document.getElementById("graph"); + var g = new Dygraph(graph, data, opts); + this.assertGraphExistence(g, graph); +}; + RangeSelectorTestCase.prototype.testRangeSelectorEnablingAfterCreation = function() { var opts = { width: 480, @@ -343,7 +374,7 @@ RangeSelectorTestCase.prototype.testRangeSelectorPositionIfXAxisNotDrawn = funct ]; var graph = document.getElementById("graph"); var g = new Dygraph(graph, data, opts); - + //assert, that the range selector is at top position 70 since the 30px of the // xAxis shouldn't be reserved since it isn't drawn. this.assertGraphExistence(g, graph);