Merge branch 'master' of https://github.com/kberg/dygraphs
[dygraphs.git] / tests / native-format.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
5 <title>Native Format</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>These two charts should be indistinguishable:</p>
16 <!-- <div id="graphdiv"></div> -->
17 <div id="graphdiv"></div>
18 <script type="text/javascript">
19 g = new Dygraph(document.getElementById("graphdiv"),
20 "x,A,B\n" +
21 "1,10,100\n" +
22 "2,20,80\n" +
23 "3,50,60\n" +
24 "4,70,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 [
32 [1,10,100],
33 [2,20,80],
34 [3,50,60],
35 [4,70,80]
36 ],
37 {
38 labels: [ "x", "A", "B" ]
39 });
40 </script>
41 </body>
42 </html>