Change no-series-defined behavior so that it computes the
[dygraphs.git] / tests / dygraph.html
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 <script type="text/javascript" src="../strftime/strftime-min.js"></script>
10 <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
11 <script type="text/javascript" src="../dygraph-canvas.js"></script>
12 <script type="text/javascript" src="../dygraph.js"></script>
13 </head>
14 <body>
15 <p>Minimal example of a dygraph chart:</p>
16 <div id="graphdiv"></div>
17 <script type="text/javascript">
18 g = new Dygraph(document.getElementById("graphdiv"),
19 "Date,Temperature\n" +
20 "2008-05-07,75\n" +
21 "2008-05-08,70\n" +
22 "2008-05-09,80\n");
23 </script>
24
25 <p>Same data, specified in a parsed format:</p>
26 <div id="graphdiv2"></div>
27 <script type="text/javascript">
28 g2 = new Dygraph(document.getElementById("graphdiv2"),
29 [ [ new Date("2008/05/07"), 75],
30 [ new Date("2008/05/08"), 70],
31 [ new Date("2008/05/09"), 80]
32 ],
33 {
34 labels: [ "Date", "Temperature" ]
35 });
36 </script>
37 </body>
38 </html>