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