Commit | Line | Data |
---|---|---|
e69c4d71 DV |
1 | <html> |
2 | <head> | |
3 | <title>out of order</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 | <script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
11 | <script type="text/javascript"> | |
12 | google.load('visualization', '1'); | |
13 | ||
14 | function createDataTable(dateType) { | |
15 | data = new google.visualization.DataTable(); | |
16 | data.addColumn(dateType, 'Date'); | |
17 | data.addColumn('number', 'Column A'); | |
18 | data.addColumn('number', 'Column B'); | |
19 | data.addRows(4); | |
20 | data.setCell(0, 0, new Date("2009/07/15")); | |
21 | data.setCell(0, 1, 3); | |
22 | data.setCell(0, 2, 3); | |
23 | data.setCell(1, 0, new Date("2009/07/22")); | |
24 | data.setCell(1, 1, 4); | |
25 | data.setCell(1, 2, 0); | |
26 | data.setCell(2, 0, new Date("2009/07/08")); | |
27 | data.setCell(2, 1, 2); | |
28 | data.setCell(2, 2, 4); | |
29 | data.setCell(3, 0, new Date("2009/07/01")); | |
30 | data.setCell(3, 1, 1); | |
31 | data.setCell(3, 2, 7); | |
32 | return data; | |
33 | } | |
34 | ||
35 | var csv = | |
36 | "Date,Column A,Column B\n" + | |
37 | "2009/07/15,3,3\n" + | |
38 | "2009/07/22,4,0\n" + | |
39 | "2009/07/08,2,4\n" + | |
40 | "2009/07/01,1,7\n"; | |
41 | ||
42 | function drawVisualization() { | |
43 | data = createDataTable('date'); | |
44 | ||
45 | new Dygraph.GVizChart( | |
46 | document.getElementById('dygraphs_gviz')).draw(data, { | |
47 | }); | |
48 | ||
49 | new Dygraph(document.getElementById('dygraphs'), csv); | |
50 | ||
51 | } | |
52 | google.setOnLoadCallback(drawVisualization); | |
53 | </script> | |
54 | </head> | |
55 | <body> | |
56 | <p>CSV data source out of order:</p> | |
57 | <div id="dygraphs" style="width:600px; height:300px;"></div> | |
58 | ||
59 | <p>gviz data source out of order:</p> | |
60 | <div id="dygraphs_gviz" style="width:600px; height:300px;"></div> | |
61 | </body> | |
62 | </html> |