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