3 <title>numeric axis
</title>
5 <script type=
"text/javascript" src=
"excanvas.js"></script>
7 <script type=
"text/javascript" src=
"../dygraph-combined.js"></script>
8 <script type=
"text/javascript" src=
"../dygraph-canvas.js"></script>
9 <script type=
"text/javascript" src=
"../dygraph.js"></script>
10 <script type=
"text/javascript" src=
"http://www.google.com/jsapi"></script>
13 <p>CSV data source:
</p>
14 <div id=
"div_g" style=
"width:600px; height:300px;"></div>
16 <p>GViz data source:
</p>
17 <div id=
"gviz" style=
"width:600px; height:300px;"></div>
19 <script type=
"text/javascript">
21 document.getElementById(
"div_g"),
23 var ret =
"X,Y1,Y2\n";
24 for (var i =
0; i <
100; i++) {
25 ret += i +
"," + i +
"," + (i * (
100-i) *
100/(
50*
50)) +
"\n";
32 google.load('visualization', '
1', {packages: ['linechart']});
34 data = new google.visualization.DataTable();
35 data.addColumn('number', 'X');
36 data.addColumn('number', 'Y1');
37 data.addColumn('number', 'Y2');
39 for (var i =
0; i <
100; i++) {
40 data.setCell(i,
0, i);
41 data.setCell(i,
1, i);
42 data.setCell(i,
2, i * (
100-i) *
100/(
50*
50));
45 new Dygraph.GVizChart(
46 document.getElementById('gviz')).draw(data,
51 google.setOnLoadCallback(addGViz);