1 /*global Gallery,Dygraph,data,$ */
2 /*jshint unused:false */
6 name
: "Color visibility",
7 title
: 'The lines should maintain their colors as their visibility is toggled.',
8 setup
: function(parent
) {
10 "<div id='blah'></div>" +
11 "<p><b>Display: </b>" +
12 "<input type=checkbox id=0 onClick='change(this)' checked>" +
13 "<label for='0'> a</label>" +
14 "<input type=checkbox id=1 onClick='change(this)' checked>" +
15 "<label for='1'> b</label>" +
16 "<input type=checkbox id=2 onClick='change(this)' checked>" +
17 "<label for='2'> c</label>" +
21 var g
= new Dygraph(document
.getElementById("blah"),
23 "10,12345,23456,34567\n" +
24 "11,12345,20123,31345\n",
28 colors
: ['#284785', '#EE1111', '#8AE234'],
29 visibility
: [true, true, true]
32 $('input[type=checkbox]').click(function() {
34 g
.setVisibility(el
.id
, el
.checked
);