-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathradio_test.html
executable file
·62 lines (50 loc) · 1.61 KB
/
radio_test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
<title>visibility</title>
<!--[if IE]>
<script type="text/javascript" src="../excanvas.js"></script>
<![endif]-->
<!--
For production (minified) code, use:
<script type="text/javascript" src="dygraph-combined.js"></script>
-->
<script type="text/javascript" src="dygraph-combined-dev.js"></script>
<script type="text/javascript" src="data.js"></script>
</head>
<body>
<h3>Click the check boxes to toggle series visibility</h3>
<div id="div_g" style="width:600px; height:300px;"></div>
<p><b>Show Series:</b></p>
<p>
<input type=checkbox id="0" onClick="change(this)">
<label for="0"> A</label><br/>
<input type=checkbox id="1" checked onClick="change(this)">
<label for="1"> B</label><br/>
<input type=checkbox id="2" checked onClick="change(this)">
<label for="2"> C</label>
</p>
<p>g.visibility() = <span id="visibility"></span></p>
<script type="text/javascript">
g = new Dygraph(
document.getElementById("div_g"),
"Date,Y1,Y2,Y3\n" +
"2009/07/12,100,200,300\n" +
"2009/07/19,150,201,102\n",
{
visibility: [false, true, true]
}
);
setStatus();
function setStatus() {
document.getElementById("visibility").innerHTML =
g.visibility().toString();
}
function change(el) {
g.setVisibility(parseInt(el.id), el.checked);
setStatus();
}
</script>
</body>
</html>