Merge branch 'master' into per_series
[dygraphs.git] / tests / fractions.html
1 <html>
2 <head>
3 <title>Fractions</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 </head>
12 <body>
13 Fractions:
14 <div id="dg" style="width:600px; height:300px;">Loading...</div>
15
16 With error bars and roller:
17 <div id="dg2" style="width:600px; height:300px;">Loading...</div>
18
19 <script type="text/javascript">
20 var frac_str =
21 "X,Frac1,Frac2\n" +
22 "1,1/2,3/4\n"+
23 "2,1/3,2/3\n"+
24 "3,2/3,17/49\n"+
25 "4,25/30,100/200";
26
27 new Dygraph(document.getElementById("dg"),
28 frac_str,
29 {
30 fractions: true
31 });
32
33 new Dygraph(document.getElementById("dg2"),
34 frac_str,
35 {
36 fractions: true,
37 errorBars: true,
38 showRoller: true
39 });
40 </script>
41 </body>
42 </html>