Fix broken tests when module is not defined
[dygraphs.git] / tests / numeric-gviz.html
CommitLineData
54425b14 1<!DOCTYPE html>
4440f6c8
DV
2<html>
3 <head>
4 <title>numeric gviz</title>
7e5ddc94
DV
5 <!--
6 For production (minified) code, use:
7 <script type="text/javascript" src="dygraph-combined.js"></script>
8 -->
9 <script type="text/javascript" src="../dygraph-dev.js"></script>
10
4440f6c8
DV
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>