X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fper_series.js;h=8a7e081f66d55670a38d6a889ff15398fcf65d98;hb=4a401b38137b4c4bd09dff59dafb4665874274f4;hp=1a044966ff7e3a9b036efdcd2e59951cddb609a2;hpb=91cf61beb7c8d3836f3d860bf89a4464dabdf709;p=dygraphs.git diff --git a/auto_tests/tests/per_series.js b/auto_tests/tests/per_series.js index 1a04496..8a7e081 100644 --- a/auto_tests/tests/per_series.js +++ b/auto_tests/tests/per_series.js @@ -20,7 +20,9 @@ perSeriesTestCase.prototype.testPerSeriesFill = function() { drawYGrid: false, drawXAxis: false, drawYAxis: false, - Y: { fillGraph: true }, + series: { + Y: { fillGraph: true }, + }, colors: [ '#FF0000', '#0000FF' ], fillAlpha: 0.15 }; @@ -165,3 +167,12 @@ perSeriesTestCase.prototype.testOldAxisSpecInNewSeriesThrows = function() { assertTrue(threw); } + +perSeriesTestCase.prototype.testColorOption = function() { + var graph = document.getElementById("graph"); + var data = "X,A,B,C\n0,1,2,3\n"; + var g = new Dygraph(graph, data, {}); + assertEquals(['rgb(64,128,0)', 'rgb(64,0,128)', 'rgb(0,128,128)'], g.getColors()); + g.updateOptions({series : { B : { color : 'purple' }}}); + assertEquals(['rgb(64,128,0)', 'purple', 'rgb(0,128,128)'], g.getColors()); +}