dd282d1e4eb0852affd4306f5b0b4e63d4672f4b
[dygraphs.git] / tests / dygraph.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="../css/dygraph.css">
5 <title>dygraph</title>
6 <!--
7 For production (minified) code, use:
8 <script type="text/javascript" src="dygraph-combined.js"></script>
9 -->
10 <script type="text/javascript" src="../dist/dygraph.js"></script>
11
12 </head>
13 <body>
14 <p>Minimal example of a dygraph chart:</p>
15 <div id="graphdiv"></div>
16 <script type="text/javascript">
17 g = new Dygraph(document.getElementById("graphdiv"),
18 "Date,Temperature\n" +
19 "2008-05-07,75\n" +
20 "2008-05-08,70\n" +
21 "2008-05-09,80\n");
22 </script>
23
24 <p>Same data, specified in a parsed format:</p>
25 <div id="graphdiv2"></div>
26 <script type="text/javascript">
27 g2 = new Dygraph(document.getElementById("graphdiv2"),
28 [ [ new Date("2008/05/07"), 75],
29 [ new Date("2008/05/08"), 70],
30 [ new Date("2008/05/09"), 80]
31 ],
32 {
33 labels: [ "Date", "Temperature" ]
34 });
35 </script>
36 </body>
37 </html>