| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> |
| 5 | <title>dygraph</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 | <p>Minimal example of a dygraph chart:</p> |
| 18 | <div id="graphdiv"></div> |
| 19 | <script type="text/javascript"> |
| 20 | g = new Dygraph(document.getElementById("graphdiv"), |
| 21 | "Date,Temperature\n" + |
| 22 | "2008-05-07,75\n" + |
| 23 | "2008-05-08,70\n" + |
| 24 | "2008-05-09,80\n"); |
| 25 | </script> |
| 26 | |
| 27 | <p>Same data, specified in a parsed format:</p> |
| 28 | <div id="graphdiv2"></div> |
| 29 | <script type="text/javascript"> |
| 30 | g2 = new Dygraph(document.getElementById("graphdiv2"), |
| 31 | [ [ new Date("2008/05/07"), 75], |
| 32 | [ new Date("2008/05/08"), 70], |
| 33 | [ new Date("2008/05/09"), 80] |
| 34 | ], |
| 35 | { |
| 36 | labels: [ "Date", "Temperature" ] |
| 37 | }); |
| 38 | </script> |
| 39 | </body> |
| 40 | </html> |