actually draw the graph
[dygraphs.git] / tests / dygraph.html
1 <html>
2 <head>
3 <title>dygraph</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 <p>Minimal example of a dygraph chart:</p>
13 <div id="graphdiv"></div>
14 <script type="text/javascript">
15 g = new Dygraph(document.getElementById("graphdiv"),
16 "Date,Temperature\n" +
17 "2008-05-07,75\n" +
18 "2008-05-08,70\n" +
19 "2008-05-09,80\n");
20 </script>
21
22 <p>Same data, specified in a parsed format:</p>
23 <div id="graphdiv2"></div>
24 <script type="text/javascript">
25 g2 = new Dygraph(document.getElementById("graphdiv2"),
26 [ [ new Date("2008/05/07"), 75],
27 [ new Date("2008/05/08"), 70],
28 [ new Date("2008/05/09"), 80]
29 ],
30 {
31 labels: [ "Date", "Temperature" ]
32 });
33 </script>
34 </body>
35 </html>