support changing renderer options like strokeWidth and add a test
[dygraphs.git] / tests / numeric-axis.html
CommitLineData
d955e223
DV
1<html>
2 <head>
3 <title>numeric axis</title>
4 <!--[if IE]>
5 <script type="text/javascript" src="excanvas.js"></script>
6 <![endif]-->
d37dca40
DV
7 <script type="text/javascript" src="../strftime/strftime-min.js"></script>
8 <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
285a6bda 9 <script type="text/javascript" src="../dygraph-canvas.js"></script>
d955e223
DV
10 <script type="text/javascript" src="../dygraph.js"></script>
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>