+ assert.deepEqual(["#ddd", "#eee"], graph.getColors());
+
+ graph.updateOptions({ file:
+ "X,Y1,Y2,Y3\n" +
+ "2011-01-01,2,3,4\n" +
+ "2011-02-02,5,3,2\n"
+ });
+ assert.deepEqual(colors2, graph.getColors());
+
+ graph.updateOptions({ colors: null, file: data });
+ assert.deepEqual(defaultColors, graph.getColors());
+});
+
+// Regression test for http://code.google.com/p/dygraphs/issues/detail?id=249
+// Verifies that setting 'legend: always' via update immediately shows the
+// legend.
+it('testUpdateLegendAlways', function() {
+ var graphDiv = document.getElementById("graph");
+ var graph = new Dygraph(graphDiv, data, opts);