actually draw the graph
[dygraphs.git] / tests / native-format.html
CommitLineData
285a6bda
DV
1<html>
2 <head>
3 <title>Native Format</title>
4 <!--[if IE]>
5 <script type="text/javascript" src="excanvas.js"></script>
6 <![endif]-->
7 <script type="text/javascript" src="../dygraph-combined.js"></script>
8 <script type="text/javascript" src="../dygraph-canvas.js"></script>
9 <script type="text/javascript" src="../dygraph.js"></script>
10 </head>
11 <body>
12 <p>These two charts should be indistinguishable:</p>
13 <!-- <div id="graphdiv"></div> -->
14 <div id="graphdiv"></div>
15 <script type="text/javascript">
16 g = new Dygraph(document.getElementById("graphdiv"),
17 "x,A,B\n" +
18 "1,10,100\n" +
19 "2,20,80\n" +
20 "3,50,60\n" +
21 "4,70,80\n");
22 </script>
23
24 <p>Same data, specified in a parsed format:</p>
25 <div id="graphdiv2"></div>
26 <script type="text/javascript">
27 g2 = new Dygraph(document.getElementById("graphdiv2"),
d16579a0 28 [
285a6bda
DV
29 [1,10,100],
30 [2,20,80],
31 [3,50,60],
d16579a0 32 [4,70,80]
285a6bda
DV
33 ],
34 {
5011e7a1 35 labels: [ "x", "A", "B" ]
285a6bda
DV
36 });
37 </script>
38 </body>
39</html>