| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> |
| 5 | <title>Fractions</title> |
| 6 | <!--[if IE]> |
| 7 | <script type="text/javascript" src="../excanvas.js"></script> |
| 8 | <![endif]--> |
| 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 | |
| 15 | </head> |
| 16 | <body> |
| 17 | Fractions: |
| 18 | <div id="dg" style="width:600px; height:300px;">Loading...</div> |
| 19 | |
| 20 | With error bars and roller: |
| 21 | <div id="dg2" style="width:600px; height:300px;">Loading...</div> |
| 22 | |
| 23 | <script type="text/javascript"> |
| 24 | var frac_str = |
| 25 | "X,Frac1,Frac2\n" + |
| 26 | "1,1/2,3/4\n"+ |
| 27 | "2,1/3,2/3\n"+ |
| 28 | "3,2/3,17/49\n"+ |
| 29 | "4,25/30,100/200"; |
| 30 | |
| 31 | var g1 = new Dygraph(document.getElementById("dg"), |
| 32 | frac_str, |
| 33 | { |
| 34 | fractions: true |
| 35 | }); |
| 36 | |
| 37 | var g2 = new Dygraph(document.getElementById("dg2"), |
| 38 | frac_str, |
| 39 | { |
| 40 | fractions: true, |
| 41 | errorBars: true, |
| 42 | showRoller: true |
| 43 | }); |
| 44 | </script> |
| 45 | </body> |
| 46 | </html> |