Clear graph when numAxes goes from 1 -> 2 in updateOptions
[dygraphs.git] / tests / fractions.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="../dist/dygraph.css">
5 <title>Fractions</title>
6 <script type="text/javascript" src="../dist/dygraph.js"></script>
7
8 </head>
9 <body>
10 Fractions:
11 <div id="dg" style="width:600px; height:300px;">Loading...</div>
12
13 With error bars and roller:
14 <div id="dg2" style="width:600px; height:300px;">Loading...</div>
15
16 <script type="text/javascript">
17 var frac_str =
18 "X,Frac1,Frac2\n" +
19 "1,1/2,3/4\n"+
20 "2,1/3,2/3\n"+
21 "3,2/3,17/49\n"+
22 "4,25/30,100/200";
23
24 var g1 = new Dygraph(document.getElementById("dg"),
25 frac_str,
26 {
27 fractions: true
28 });
29
30 var g2 = new Dygraph(document.getElementById("dg2"),
31 frac_str,
32 {
33 fractions: true,
34 errorBars: true,
35 showRoller: true
36 });
37 </script>
38 </body>
39 </html>