1 /*global Gallery,Dygraph,data */
6 title
: 'Different color cycles',
7 setup
: function(parent
) {
9 "<div id='blah'></div>" +
10 "<p><b>Colors: </b>" +
11 "<button id='0'> first set</button>" +
12 "<button id='1'> second set</button>" +
13 "<button id='2'> undefined</button>" +
18 ['#284785', '#EE1111', '#8AE234'],
19 ['#444444', '#888888', '#DDDDDD'],
22 var chart
= new Dygraph(document
.getElementById("blah"),
24 "10,12345,23456,34567\n" +
25 "11,12345,20123,31345\n",
32 function change(event
) {
33 chart
.updateOptions({colors
: colorSets
[event
.target
.id
]});
35 document
.getElementById("0").onclick
= change
;
36 document
.getElementById("1").onclick
= change
;
37 document
.getElementById("2").onclick
= change
;