4 <title>out of order
</title>
6 For production (minified) code, use:
7 <script type=
"text/javascript" src=
"dygraph-combined.js"></script>
9 <script type=
"text/javascript" src=
"../dygraph-dev.js"></script>
11 <script type=
"text/javascript" src=
"http://www.google.com/jsapi"></script>
12 <script type=
"text/javascript">
13 // Capture warnings, since these are what we want in this test.
14 Dygraph.prototype.warn = function(msg) {
18 google.load('visualization', '
1');
20 function createDataTable(dateType) {
21 data = new google.visualization.DataTable();
22 data.addColumn(dateType, 'Date');
23 data.addColumn('number', 'Column A');
24 data.addColumn('number', 'Column B');
26 data.setCell(
0,
0, new Date(
"2009/07/15"));
27 data.setCell(
0,
1,
3);
28 data.setCell(
0,
2,
3);
29 data.setCell(
1,
0, new Date(
"2009/07/22"));
30 data.setCell(
1,
1,
4);
31 data.setCell(
1,
2,
0);
32 data.setCell(
2,
0, new Date(
"2009/07/08"));
33 data.setCell(
2,
1,
2);
34 data.setCell(
2,
2,
4);
35 data.setCell(
3,
0, new Date(
"2009/07/01"));
36 data.setCell(
3,
1,
1);
37 data.setCell(
3,
2,
7);
42 "Date,Column A,Column B\n" +
48 function drawVisualization() {
49 data = createDataTable('date');
51 var chart = new Dygraph.GVizChart(
52 document.getElementById('dygraphs_gviz')).draw(data, {
55 var graph = new Dygraph(document.getElementById('dygraphs'), csv);
58 google.setOnLoadCallback(drawVisualization);
62 <p>CSV data source out of order:
</p>
63 <div id=
"dygraphs" style=
"width:600px; height:300px;"></div>
65 <p>gviz data source out of order:
</p>
66 <div id=
"dygraphs_gviz" style=
"width:600px; height:300px;"></div>