X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fsimple_drawing.js;h=bda0e84f5e8de2b6bf11b335f67f2e7929ca225c;hb=17bdb194d3ff6ecc02224038b3070024a5949e97;hp=557013274acf9bbf916dfda22ac8a68d311d611c;hpb=3123ca57f71d145bb5bcc4a2f754d3dff3225346;p=dygraphs.git diff --git a/auto_tests/tests/simple_drawing.js b/auto_tests/tests/simple_drawing.js index 5570132..bda0e84 100644 --- a/auto_tests/tests/simple_drawing.js +++ b/auto_tests/tests/simple_drawing.js @@ -23,10 +23,11 @@ * * @author konigsberg@google.com (Robert Konigsberg) */ -var ZERO_TO_FIFTY = [[ 10, 0 ] , [ 20, 50 ]]; describe("simple-drawing", function() { +var ZERO_TO_FIFTY = 'X,Y\n10,0\n20,50'; + var _origFunc = Dygraph.getContext; beforeEach(function() { document.body.innerHTML = "
"; @@ -41,17 +42,18 @@ afterEach(function() { it('testDrawSimpleRangePlusOne', function() { var opts = { - axes : { - x : { + axes: { + x: { drawGrid: false, - drawAxis: false, + drawAxis: false }, - y : { + y: { drawGrid: false, - drawAxis: false, + drawAxis: false } }, - valueRange: [0,51] } + valueRange: [0,51] + }; var graph = document.getElementById("graph"); var g = new Dygraph(graph, ZERO_TO_FIFTY, opts); @@ -121,7 +123,8 @@ it('testDrawSimpleDash', function() { series: { 'Y1': {strokePattern: [25, 7, 7, 7]}, }, - colors: ['#ff0000'] + colors: ['#ff0000'], + labels: ['X', 'Y'] }; var graph = document.getElementById("graph"); @@ -143,18 +146,19 @@ it('testDrawSimpleDash', function() { */ it('testDrawThickLine', function() { var opts = { - axes : { - x : { + axes: { + x: { drawGrid: false, - drawAxis: false, + drawAxis: false }, - y : { + y: { drawGrid: false, - drawAxis: false, + drawAxis: false } }, strokeWidth: 15, - colors: ['#ff0000'] + colors: ['#ff0000'], + labels: ['X', 'Y'] }; var graph = document.getElementById("graph");