REFACTORING: corrected the name for test "step_plot_per_series"
[dygraphs.git] / tests / gviz-infinity.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
5 <title>gviz</title>
6 <!--[if IE]>
7 <script type="text/javascript" src="../excanvas.js"></script>
8 <![endif]-->
9 <!--
10 For production (minified) code, use:
11 <script type="text/javascript" src="dygraph-combined.js"></script>
12 -->
13 <script type="text/javascript" src="../dygraph-dev.js"></script>
14
15 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
16 <script type="text/javascript">
17 google.load('visualization', '1', {packages: ['linechart']});
18
19 function createDataTable(dateType) {
20 data = new google.visualization.DataTable();
21 data.addColumn(dateType, 'Date');
22 data.addColumn('number', 'Column A');
23 data.addColumn('number', 'Column B');
24 data.addRows(4);
25 data.setCell(0, 0, new Date("2009/07/01"));
26 data.setCell(0, 1, 1);
27 data.setCell(0, 2, 7);
28 data.setCell(1, 0, new Date("2009/07/08"));
29 data.setCell(1, 1, 2);
30 data.setCell(1, 2, 4);
31 data.setCell(2, 0, new Date("2009/07/15"));
32 data.setCell(2, 1, 3);
33 data.setCell(2, 2, Infinity);
34 data.setCell(3, 0, new Date("2009/07/22"));
35 data.setCell(3, 1, 4);
36 data.setCell(3, 2, 0);
37 return data;
38 }
39
40 function drawVisualization() {
41 data = createDataTable('date');
42 new google.visualization.LineChart(
43 document.getElementById('gviz')).draw(data, null);
44
45 var chart1 = new Dygraph.GVizChart(document.getElementById('dygraphs'))
46 .draw(data, { });
47 }
48
49 google.setOnLoadCallback(drawVisualization);
50 </script>
51 </head>
52 <body>
53 <p>This tests that infinite values don't break dygraphs.</p>
54 <p>gviz line chart:</p>
55 <div id="gviz" style="width:600px; height:300px;"></div>
56
57 <p>same data drawn using dygraphs:</p>
58 date column:
59 <div id="dygraphs" style="width:600px; height:300px;"></div>
60 </body>
61 </html>