X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Frange_tests.js;h=c652af7788f270cb2250736c1f95a22b19d368bc;hb=0b85865a8b8c34b1d63f11bad02360e96ad8e02a;hp=2b2e59a7266be78b01e2c3ce6cbaeafe73374850;hpb=fa460473ef9397759466361ff32de56a4f8fa956;p=dygraphs.git diff --git a/auto_tests/tests/range_tests.js b/auto_tests/tests/range_tests.js index 2b2e59a..c652af7 100644 --- a/auto_tests/tests/range_tests.js +++ b/auto_tests/tests/range_tests.js @@ -368,3 +368,38 @@ RangeTestCase.prototype.testLogscalePad = function() { [[-10, 10], [10, 10], [30, 1000]], [-10, 30], [5.01691, 1993.25801]); }; + +/** + * Verify scrolling all-zero region, traditional. + */ +RangeTestCase.prototype.testZeroScroll = function() { + g = new Dygraph( + document.getElementById("graph"), + "X,Y\n" + + "1,0\n" + + "8,0\n" + + "9,0.1\n", + { + drawAxesAtZero: true, + animatedZooms: true, + avoidMinZero: true + }); +}; + +/** + * Verify scrolling all-zero region, new-style. + */ +RangeTestCase.prototype.testZeroScroll2 = function() { + g = new Dygraph( + document.getElementById("graph"), + "X,Y\n" + + "1,0\n" + + "8,0\n" + + "9,0.1\n", + { + animatedZooms: true, + drawAxesAtZero: true, + xRangePad: 4, + yRangePad: 4 + }); +};