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