2 * @fileoverview Test cases for DygraphOptions.
4 var DygraphOptionsTestCase
= TestCase("dygraph-options-tests");
6 DygraphOptionsTestCase
.prototype.setUp
= function() {
7 document
.body
.innerHTML
= "<div id='graph'></div>";
10 DygraphOptionsTestCase
.prototype.tearDown
= function() {
14 * Pathalogical test to ensure getSeriesNames works
16 DygraphOptionsTestCase
.prototype.testGetSeriesNames
= function() {
21 var data
= "X,Y,Y2,Y3\n" +
24 // Kind of annoying that you need a DOM to test the object.
25 var graph
= document
.getElementById("graph");
26 var g
= new Dygraph(graph
, data
, opts
);
28 // We don't need to get at g's attributes_ object just
29 // to test DygraphOptions.
30 var o
= new DygraphOptions(g
);
31 assertEquals(["Y", "Y2", "Y3"], o
.seriesNames());