4 <meta http-equiv=
"X-UA-Compatible" content=
"IE=EmulateIE7; IE=EmulateIE9">
7 <script type=
"text/javascript" src=
"../excanvas.js"></script>
10 For production (minified) code, use:
11 <script type=
"text/javascript" src=
"dygraph-combined.js"></script>
13 <script type=
"text/javascript" src=
"../dygraph-dev.js"></script>
15 <script type=
"text/javascript" src=
"http://www.google.com/jsapi"></script>
16 <script type=
"text/javascript">
17 google.load('visualization', '
1', {packages: ['linechart']});
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');
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);
40 function drawVisualization() {
41 data = createDataTable('date');
42 new google.visualization.LineChart(
43 document.getElementById('gviz')).draw(data, null);
45 var chart1 = new Dygraph.GVizChart(document.getElementById('dygraphs'))
48 data = createDataTable('datetime');
49 var chart2 = new Dygraph.GVizChart(
50 document.getElementById('dygraphs_datetime')).draw(data, {
54 google.setOnLoadCallback(drawVisualization);
58 <p>This tests that infinite values don't break dygraphs.
</p>
59 <p>gviz line chart:
</p>
60 <div id=
"gviz" style=
"width:600px; height:300px;"></div>
62 <p>same data drawn using dygraphs:
</p>
64 <div id=
"dygraphs" style=
"width:600px; height:300px;"></div>