Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
e69c4d71 DV |
2 | <html> |
3 | <head> | |
10494b48 | 4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> |
e69c4d71 DV |
5 | <title>out of order</title> |
6 | <!--[if IE]> | |
a2b2c3a1 | 7 | <script type="text/javascript" src="../excanvas.js"></script> |
e69c4d71 | 8 | <![endif]--> |
7e5ddc94 DV |
9 | <!-- |
10 | For production (minified) code, use: | |
11 | <script type="text/javascript" src="dygraph-combined.js"></script> | |
12 | --> | |
13 | <script type="text/javascript" src="../dygraph-dev.js"></script> | |
14 | ||
e69c4d71 DV |
15 | <script type="text/javascript" src="http://www.google.com/jsapi"></script> |
16 | <script type="text/javascript"> | |
17 | google.load('visualization', '1'); | |
18 | ||
19 | function createDataTable(dateType) { | |
20 | data = new google.visualization.DataTable(); | |
21 | data.addColumn(dateType, 'Date'); | |
22 | data.addColumn('number', 'Column A'); | |
23 | data.addColumn('number', 'Column B'); | |
24 | data.addRows(4); | |
25 | data.setCell(0, 0, new Date("2009/07/15")); | |
26 | data.setCell(0, 1, 3); | |
27 | data.setCell(0, 2, 3); | |
28 | data.setCell(1, 0, new Date("2009/07/22")); | |
29 | data.setCell(1, 1, 4); | |
30 | data.setCell(1, 2, 0); | |
31 | data.setCell(2, 0, new Date("2009/07/08")); | |
32 | data.setCell(2, 1, 2); | |
33 | data.setCell(2, 2, 4); | |
34 | data.setCell(3, 0, new Date("2009/07/01")); | |
35 | data.setCell(3, 1, 1); | |
36 | data.setCell(3, 2, 7); | |
37 | return data; | |
38 | } | |
39 | ||
40 | var csv = | |
41 | "Date,Column A,Column B\n" + | |
42 | "2009/07/15,3,3\n" + | |
43 | "2009/07/22,4,0\n" + | |
44 | "2009/07/08,2,4\n" + | |
45 | "2009/07/01,1,7\n"; | |
46 | ||
47 | function drawVisualization() { | |
48 | data = createDataTable('date'); | |
49 | ||
50 | new Dygraph.GVizChart( | |
51 | document.getElementById('dygraphs_gviz')).draw(data, { | |
52 | }); | |
53 | ||
54 | new Dygraph(document.getElementById('dygraphs'), csv); | |
55 | ||
56 | } | |
57 | google.setOnLoadCallback(drawVisualization); | |
58 | </script> | |
59 | </head> | |
60 | <body> | |
61 | <p>CSV data source out of order:</p> | |
62 | <div id="dygraphs" style="width:600px; height:300px;"></div> | |
63 | ||
64 | <p>gviz data source out of order:</p> | |
65 | <div id="dygraphs_gviz" style="width:600px; height:300px;"></div> | |
66 | </body> | |
67 | </html> |