Merge branch 'master' into per_series
[dygraphs.git] / tests / numeric-gviz.html
CommitLineData
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]-->
d37dca40
DV
7 <script type="text/javascript" src="../strftime/strftime-min.js"></script>
8 <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
4440f6c8
DV
9 <script type="text/javascript" src="../dygraph-canvas.js"></script>
10 <script type="text/javascript" src="../dygraph.js"></script>
11
12 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
13
14 <script type="text/javascript">
15 google.load("visualization", "1", {"packages":[ "columnchart"]});
16 google.setOnLoadCallback(drawchart);
17
18 function drawchart() {
19 var tableString =
20 "{cols:[{id:'point',label:'n',type:'number',pattern:''}," +
21 "{id:'0',label:'0',type:'number',pattern:''}," +
22 "{id:'stddev',label:'stddev',type:'number',pattern:''}]," +
23 "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}]}]}";
24 data = new google.visualization.DataTable(eval('(' + tableString + ')'));
25 chart = new Dygraph.GVizChart(document.getElementById(
26 "graph"));
27 chart.draw(data, {errorBars: true, showRoller: true, includeZero: true });
28 }
29 </script>
30 </head>
31 <body>
32 <p>This tests that dygraphs can display gviz DataTable's with a numeric
33 x-axis.</p>
34 <div id="graph" style="width: 800px; height: 400px;"></div>
35 </body>
36</html>