2cf59cde442fe5bf4431c19e5d11c5a39ce0b1e7
[dygraphs.git] / tests / native-format.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="../css/dygraph.css">
5 <title>Native Format</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>These two charts should be indistinguishable:</p>
15 <!-- <div id="graphdiv"></div> -->
16 <div id="graphdiv"></div>
17 <script type="text/javascript">
18 g = new Dygraph(document.getElementById("graphdiv"),
19 "x,A,B\n" +
20 "1,10,100\n" +
21 "2,20,80\n" +
22 "3,50,60\n" +
23 "4,70,80\n");
24 </script>
25
26 <p>Same data, specified in a parsed format:</p>
27 <div id="graphdiv2"></div>
28 <script type="text/javascript">
29 g2 = new Dygraph(document.getElementById("graphdiv2"),
30 [
31 [1,10,100],
32 [2,20,80],
33 [3,50,60],
34 [4,70,80]
35 ],
36 {
37 labels: [ "x", "A", "B" ]
38 });
39 </script>
40 </body>
41 </html>