Fix and regression test for fast proxy artifacts.
[dygraphs.git] / tests / numeric-axis.html
CommitLineData
54425b14 1<!DOCTYPE html>
d955e223
DV
2<html>
3 <head>
4 <title>numeric axis</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
d955e223
DV
11 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
12 </head>
13 <body>
14 <p>CSV data source:</p>
d16579a0 15 <div id="div_g" style="width:600px; height:300px;"></div>
d955e223
DV
16
17 <p>GViz data source:</p>
18 <div id="gviz" style="width:600px; height:300px;"></div>
19
20 <script type="text/javascript">
285a6bda 21 g = new Dygraph(
d16579a0 22 document.getElementById("div_g"),
d955e223
DV
23 function() {
24 var ret = "X,Y1,Y2\n";
25 for (var i = 0; i < 100; i++) {
26 ret += i + "," + i + "," + (i * (100-i) * 100/(50*50)) + "\n";
27 }
28 return ret;
285a6bda
DV
29 },
30 { }
d955e223
DV
31 );
32
33 google.load('visualization', '1', {packages: ['linechart']});
34 function addGViz() {
35 data = new google.visualization.DataTable();
36 data.addColumn('number', 'X');
37 data.addColumn('number', 'Y1');
38 data.addColumn('number', 'Y2');
39 data.addRows(100);
40 for (var i = 0; i < 100; i++) {
41 data.setCell(i, 0, i);
42 data.setCell(i, 1, i);
43 data.setCell(i, 2, i * (100-i) * 100/(50*50));
44 }
45
285a6bda 46 new Dygraph.GVizChart(
d955e223
DV
47 document.getElementById('gviz')).draw(data,
48 {
d955e223
DV
49 });
50 }
51
52 google.setOnLoadCallback(addGViz);
53 </script>
54 </body>
55</html>