Merge branch 'master' of https://github.com/danvk/dygraphs
[dygraphs.git] / tests / layout-options.html
1 <html>
2 <head>
3 <title>Layout Options</title>
4 <!--[if IE]>
5 <script type="text/javascript" src="../excanvas.js"></script>
6 <![endif]-->
7 <script type="text/javascript" src="../strftime/strftime-min.js"></script>
8 <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
9 <script type="text/javascript" src="../dygraph-canvas.js"></script>
10 <script type="text/javascript" src="../dygraph.js"></script>
11 <script type="text/javascript" src="data.js"></script>
12 </head>
13 <body>
14 <h2>Layout Options Update</h2>
15 <div id="chart" style="width:600px; height:300px;"></div>
16 <script type="text/javascript">
17 g = new Dygraph(document.getElementById('chart'), data,
18 {
19 strokeWidth: 2
20 });
21
22 function change() {
23 g.updateOptions({strokeWidth:
24 parseFloat(document.getElementById("strokeWidth").value)});
25 }
26 </script>
27
28 <p>Stroke Width:
29 <input type=text id="strokeWidth" value="2.0" />
30 <input type=button value="Change Stroke Width" onClick="change()" />
31 </p>
32 </body>
33 </html>