add strftime to generate-combined and update combined file
[dygraphs.git] / tests / gviz.html
CommitLineData
79420a1e
DV
1<html>
2 <head>
3 <title>noise</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.js"></script>
9 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
10 <script type="text/javascript">
11 google.load('visualization', '1', {packages: ['linechart']});
12
13 function drawVisualization() {
14 data = new google.visualization.DataTable();
15 data.addColumn('date', 'Date');
16 data.addColumn('number', 'Column A');
17 data.addColumn('number', 'Column B');
18 data.addRows(4);
19 data.setCell(0, 0, new Date("2009/07/01"));
20 data.setCell(0, 1, 1);
21 data.setCell(0, 2, 7);
22 data.setCell(1, 0, new Date("2009/07/08"));
23 data.setCell(1, 1, 2);
24 data.setCell(1, 2, 4);
25 data.setCell(2, 0, new Date("2009/07/15"));
26 data.setCell(2, 1, 3);
27 data.setCell(2, 2, 3);
28 data.setCell(3, 0, new Date("2009/07/22"));
29 data.setCell(3, 1, 4);
30 data.setCell(3, 2, 0);
31
32 new google.visualization.LineChart(
540d00f1 33 document.getElementById('gviz')).draw(data, null);
79420a1e 34
540d00f1
DV
35 new DateGraph.GVizChart(
36 document.getElementById('dygraphs')).draw(data, null);
79420a1e
DV
37 }
38 google.setOnLoadCallback(drawVisualization);
39 </script>
40 </head>
41 <body>
42 <p>gviz line chart:</p>
43 <div id="gviz" style="width:600px; height:300px;"></div>
44
45 <p>same data drawn using dygraphs:</p>
46 <div id="dygraphs" style="width:600px; height:300px;"></div>
47 </body>
48</html>