Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
285a6bda DV |
2 | <html> |
3 | <head> | |
10494b48 | 4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> |
6f091595 | 5 | <title>demo</title> |
285a6bda | 6 | <!--[if IE]> |
a2b2c3a1 | 7 | <script type="text/javascript" src="../excanvas.js"></script> |
285a6bda | 8 | <![endif]--> |
74a5af31 | 9 | <script type="text/javascript" src="../dygraph-dev.js"></script> |
285a6bda DV |
10 | </head> |
11 | <body> | |
12 | <h2>Demo</h2> | |
13 | <font size=-1>(Mouse over to highlight individual values. Click and drag to zoom. Double-click to zoom out.)</font><br/> | |
14 | <table><tr><td> | |
c21d2c2d | 15 | <div id="demodiv"></div> |
285a6bda DV |
16 | </td><td valign=top> |
17 | <div id="status" style="width:200px; font-size:0.8em; padding-top:5px;"></div> | |
18 | </td> | |
19 | </tr></table> | |
20 | <script type="text/javascript"> | |
00259bf3 | 21 | g = new Dygraph( |
285a6bda DV |
22 | document.getElementById("demodiv"), |
23 | function() { | |
24 | var zp = function(x) { if (x < 10) return "0"+x; else return x; }; | |
25 | var r = "date,parabola,line,another line,sine wave\n"; | |
26 | for (var i=1; i<=31; i++) { | |
27 | r += "200610" + zp(i); | |
28 | r += "," + 10*(i*(31-i)); | |
29 | r += "," + 10*(8*i); | |
30 | r += "," + 10*(250 - 8*i); | |
31 | r += "," + 10*(125 + 125 * Math.sin(0.3*i)); | |
32 | r += "\n"; | |
33 | } | |
34 | return r; | |
35 | }, | |
285a6bda | 36 | { |
285a6bda DV |
37 | labelsDiv: document.getElementById('status'), |
38 | labelsSeparateLines: true, | |
39 | labelsKMB: true, | |
74a5af31 | 40 | legend: 'always', |
551aa865 | 41 | colors: ["rgb(51,204,204)", |
285a6bda DV |
42 | "rgb(255,100,100)", |
43 | "#00DD55", | |
44 | "rgba(50,50,200,0.4)"], | |
ad1798c2 DV |
45 | width: 640, |
46 | height: 480, | |
47 | title: 'Interesting Shapes', | |
48 | xlabel: 'Date', | |
74a5af31 | 49 | ylabel: 'Count', |
0604287e | 50 | axisLineColor: 'white' |
189f8030 | 51 | // drawXGrid: false |
285a6bda DV |
52 | } |
53 | ); | |
54 | </script> | |
55 | </body> | |
56 | </html> |