Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
4440f6c8 DV |
2 | <html> |
3 | <head> | |
fd6b8dad | 4 | <link rel="stylesheet" href="../dist/dygraph.css"> |
4440f6c8 | 5 | <title>numeric gviz</title> |
fbd6834a | 6 | <script type="text/javascript" src="../dist/dygraph.js"></script> |
7e5ddc94 | 7 | |
4440f6c8 DV |
8 | |
9 | <script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
10 | ||
11 | <script type="text/javascript"> | |
12 | google.load("visualization", "1", {"packages":[ "columnchart"]}); | |
13 | google.setOnLoadCallback(drawchart); | |
14 | ||
15 | function drawchart() { | |
16 | var tableString = | |
17 | "{cols:[{id:'point',label:'n',type:'number',pattern:''}," + | |
18 | "{id:'0',label:'0',type:'number',pattern:''}," + | |
19 | "{id:'stddev',label:'stddev',type:'number',pattern:''}]," + | |
20 | "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}]}]}"; | |
21 | data = new google.visualization.DataTable(eval('(' + tableString + ')')); | |
22 | chart = new Dygraph.GVizChart(document.getElementById( | |
23 | "graph")); | |
24 | chart.draw(data, {errorBars: true, showRoller: true, includeZero: true }); | |
25 | } | |
26 | </script> | |
27 | </head> | |
28 | <body> | |
29 | <p>This tests that dygraphs can display gviz DataTable's with a numeric | |
30 | x-axis.</p> | |
31 | <div id="graph" style="width: 800px; height: 400px;"></div> | |
32 | </body> | |
33 | </html> |