actually draw the graph
[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="../dygraph-combined.js"></script>
8 <script type="text/javascript" src="../dygraph-canvas.js"></script>
9 <script type="text/javascript" src="../dygraph.js"></script>
10 </head>
11 <body>
12 Fractions:
13 <div id="dg" style="width:600px; height:300px;">Loading...</div>
14
15 With error bars and roller:
16 <div id="dg2" style="width:600px; height:300px;">Loading...</div>
17
18 <script type="text/javascript">
19 var frac_str =
20 "X,Frac1,Frac2\n" +
21 "1,1/2,3/4\n"+
22 "2,1/3,2/3\n"+
23 "3,2/3,17/49\n"+
24 "4,25/30,100/200";
25
26 new Dygraph(document.getElementById("dg"),
27 frac_str,
28 {
29 fractions: true
30 });
31
32 new Dygraph(document.getElementById("dg2"),
33 frac_str,
34 {
35 fractions: true,
36 errorBars: true,
37 showRoller: true
38 });
39 </script>
40 </body>
41 </html>