sample annotation
[dygraphs.git] / tests / annotation.html
1 <html>
2 <head>
3 <title>demo</title>
4 <!--[if IE]>
5 <script type="text/javascript" src="excanvas.js"></script>
6 <![endif]-->
7 <script type="text/javascript" src="../strftime/strftime-min.js"></script>
8 <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
9 <script type="text/javascript" src="../dygraph-canvas.js"></script>
10 <script type="text/javascript" src="../dygraph.js"></script>
11 </head>
12 <body>
13 <div id="g"></div>
14
15 <script type="text/javascript">
16 g = new DateGraph(
17 document.getElementById("g"),
18 function() {
19 var zp = function(x) { if (x < 10) return "0"+x; else return x; };
20 var r = "date,parabola,line,another line,sine wave\n";
21 for (var i=1; i<=31; i++) {
22 r += "200610" + zp(i);
23 r += "," + 10*(i*(31-i));
24 r += "," + 10*(8*i);
25 r += "," + 10*(250 - 8*i);
26 r += "," + 10*(125 + 125 * Math.sin(0.3*i));
27 r += "\n";
28 }
29 return r;
30 },
31 {
32 rollPeriod: 1,
33 width: 480,
34 height: 320
35 }
36 );
37 </script>
38 </body>
39 </html>