Commit | Line | Data |
---|---|---|
4440f6c8 DV |
1 | <html> |
2 | <head> | |
3 | <title>numeric gviz</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 | ||
11 | <script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
12 | ||
13 | <script type="text/javascript"> | |
14 | google.load("visualization", "1", {"packages":[ "columnchart"]}); | |
15 | google.setOnLoadCallback(drawchart); | |
16 | ||
17 | function drawchart() { | |
18 | var tableString = | |
19 | "{cols:[{id:'point',label:'n',type:'number',pattern:''}," + | |
20 | "{id:'0',label:'0',type:'number',pattern:''}," + | |
21 | "{id:'stddev',label:'stddev',type:'number',pattern:''}]," + | |
22 | "rows:[{c:[{v:0.0},{v:41.97},{v:17.86}]},{c:[{v:1.0},{v:11.71},{v:17.86}]},{c:[{v:2.0},{v:43.26},{v:17.86}]}]}"; | |
23 | data = new google.visualization.DataTable(eval('(' + tableString + ')')); | |
24 | chart = new Dygraph.GVizChart(document.getElementById( | |
25 | "graph")); | |
26 | chart.draw(data, {errorBars: true, showRoller: true, includeZero: true }); | |
27 | } | |
28 | </script> | |
29 | </head> | |
30 | <body> | |
31 | <p>This tests that dygraphs can display gviz DataTable's with a numeric | |
32 | x-axis.</p> | |
33 | <div id="graph" style="width: 800px; height: 400px;"></div> | |
34 | </body> | |
35 | </html> |