Add axis_labels tests that rely on the preferred style of formatting axes.
[dygraphs.git] / tests / visibility.html
CommitLineData
54425b14 1<!DOCTYPE html>
bf0e5ca5
DV
2<html>
3 <head>
10494b48 4 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
937029df 5 <title>visibility</title>
bf0e5ca5 6 <!--[if IE]>
a2b2c3a1 7 <script type="text/javascript" src="../excanvas.js"></script>
bf0e5ca5 8 <![endif]-->
7e5ddc94
DV
9 <!--
10 For production (minified) code, use:
11 <script type="text/javascript" src="dygraph-combined.js"></script>
12 -->
13 <script type="text/javascript" src="../dygraph-dev.js"></script>
14
bf0e5ca5
DV
15 <script type="text/javascript" src="data.js"></script>
16 </head>
17 <body>
18 <h3>Click the check boxes to toggle series visibility</h3>
19 <div id="div_g" style="width:600px; height:300px;"></div>
20
21 <p><b>Show Series:</b></p>
22 <p>
23 <input type=checkbox id="0" onClick="change(this)">
24 <label for="0"> A</label><br/>
25 <input type=checkbox id="1" checked onClick="change(this)">
ddb40267
RK
26 <label for="1"> B</label><br/>
27 <input type=checkbox id="2" checked onClick="change(this)">
28 <label for="2"> C</label>
bf0e5ca5
DV
29 </p>
30
31 <p>g.visibility() = <span id="visibility"></span></p>
32
33
34 <script type="text/javascript">
35 g = new Dygraph(
36 document.getElementById("div_g"),
ddb40267 37 NoisyDataABC, {
bf0e5ca5
DV
38 rollPeriod: 7,
39 errorBars: true,
ddb40267 40 visibility: [false, true, true]
bf0e5ca5
DV
41 }
42 );
43 setStatus();
44
45 function setStatus() {
46 document.getElementById("visibility").innerHTML =
47 g.visibility().toString();
48 }
49
50 function change(el) {
51 g.setVisibility(parseInt(el.id), el.checked);
52 setStatus();
53 }
54 </script>
55
56 </body>
57</html>