X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Faxis_labels.js;h=5a631fa13fc45afaefc52a90ad067de25f39e9e2;hb=refs%2Ftags%2Fv2.0.0;hp=c390392f26ef4965f59961951325f502dd3d8834;hpb=b4b9eeac8b116c18bbf6ebb0c4d542a3f8d2ce32;p=dygraphs.git diff --git a/auto_tests/tests/axis_labels.js b/auto_tests/tests/axis_labels.js index c390392..5a631fa 100644 --- a/auto_tests/tests/axis_labels.js +++ b/auto_tests/tests/axis_labels.js @@ -798,75 +798,6 @@ it('testAxisLabelFontSizeNull', function() { assertFontSize(document.querySelectorAll(".dygraph-axis-label-y"), "14px"); }); -it('testAxisLabelColor', function() { - var graph = document.getElementById("graph"); - var g = new Dygraph(graph, simpleData, {}); - - // Be sure we're dealing with a black default. - assert.equal("black", DEFAULT_ATTRS.axisLabelColor); - - var assertColor = function(selector, expected) { - Util.assertStyleOfChildren(selector, "color", expected); - } - - assertColor(document.querySelectorAll(".dygraph-axis-label-x"), "rgb(0, 0, 0)"); - assertColor(document.querySelectorAll(".dygraph-axis-label-y"), "rgb(0, 0, 0)"); - - g.updateOptions({ axisLabelColor : "red"}); - assertColor(document.querySelectorAll(".dygraph-axis-label-x"), "rgb(255, 0, 0)"); - assertColor(document.querySelectorAll(".dygraph-axis-label-y"), "rgb(255, 0, 0)"); - - g.updateOptions({ - axisLabelColor : null, - axes : { - x : { axisLabelColor : "blue" }, - } - }); - - assertColor(document.querySelectorAll(".dygraph-axis-label-x"), "rgb(0, 0, 255)"); - assertColor(document.querySelectorAll(".dygraph-axis-label-y"), "rgb(0, 0, 0)"); - - g.updateOptions({ - axes : { - y : { axisLabelColor : "green" }, - } - }); - - assertColor(document.querySelectorAll(".dygraph-axis-label-x"), "rgb(0, 0, 255)"); - assertColor(document.querySelectorAll(".dygraph-axis-label-y"), "rgb(0, 128, 0)"); - - g.updateOptions({ - series : { - Y2 : { axis : "y2" } // copy y2 series to y2 axis. - }, - axes : { - y2 : { axisLabelColor : "yellow" }, - } - }); - - assertColor(document.querySelectorAll(".dygraph-axis-label-x"), "rgb(0, 0, 255)"); - assertColor(document.querySelectorAll(".dygraph-axis-label-y1"), "rgb(0, 128, 0)"); - assertColor(document.querySelectorAll(".dygraph-axis-label-y2"), "rgb(255, 255, 0)"); -}); - -it('testAxisLabelColorNull', function() { - var graph = document.getElementById("graph"); - var g = new Dygraph(graph, simpleData, - { - axisLabelColor: null - }); - - var assertColor = function(selector, expected) { - Util.assertStyleOfChildren(selector, "color", expected); - } - - // Be sure we're dealing with a 14-point default. - assert.equal(14, DEFAULT_ATTRS.axisLabelFontSize); - - assertColor(document.querySelectorAll(".dygraph-axis-label-x"), "rgb(0, 0, 0)"); - assertColor(document.querySelectorAll(".dygraph-axis-label-y"), "rgb(0, 0, 0)"); -}); - /* * This test shows that the label formatter overrides labelsKMB for all values. */