Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
285a6bda DV |
2 | <html> |
3 | <head> | |
93a5bb4c | 4 | <link rel="stylesheet" href="../css/dygraph.css"> |
285a6bda | 5 | <title>Native Format</title> |
7e5ddc94 DV |
6 | <!-- |
7 | For production (minified) code, use: | |
8 | <script type="text/javascript" src="dygraph-combined.js"></script> | |
9 | --> | |
fbd6834a | 10 | <script type="text/javascript" src="../dist/dygraph.js"></script> |
7e5ddc94 | 11 | |
285a6bda DV |
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"), | |
d16579a0 | 30 | [ |
285a6bda DV |
31 | [1,10,100], |
32 | [2,20,80], | |
33 | [3,50,60], | |
d16579a0 | 34 | [4,70,80] |
285a6bda DV |
35 | ], |
36 | { | |
5011e7a1 | 37 | labels: [ "x", "A", "B" ] |
285a6bda DV |
38 | }); |
39 | </script> | |
40 | </body> | |
41 | </html> |