X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Faxis_labels.js;h=d4812ea4b03c5b8a2f2b58d5cc43763aa6ad3015;hb=a716aff2f83602d77caec236eaa9826ecf1b12c8;hp=ddb7a0f3a8e7818d9c5d8dbbed435e2056ec8d35;hpb=1761e6ed4ef884d80c7c9c083323e76414e83de6;p=dygraphs.git diff --git a/auto_tests/tests/axis_labels.js b/auto_tests/tests/axis_labels.js index ddb7a0f..d4812ea 100644 --- a/auto_tests/tests/axis_labels.js +++ b/auto_tests/tests/axis_labels.js @@ -525,6 +525,28 @@ AxisLabelsTestCase.prototype.testLabelKMG2 = function() { Util.getYLabels()); }; +// Same sa testLabelKMG2 but specifies the option at the +// top of the option dictionary. +AxisLabelsTestCase.prototype.testLabelKMG2_top = function() { + var data = []; + data.push([0,0]); + data.push([1,2000]); + data.push([2,1000]); + + var g = new Dygraph( + document.getElementById("graph"), + data, + { + labels: [ 'X', 'bar' ], + labelsKMG2: true + } + ); + + assertEquals( + ["0","256","512","768","1k","1.25k","1.5k","1.75k","2k"], + Util.getYLabels()); +}; + /** * Verify that log scale axis range is properly specified. */