| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> |
| 5 | <title>demo</title> |
| 6 | <!--[if IE]> |
| 7 | <script type="text/javascript" src="../excanvas.js"></script> |
| 8 | <![endif]--> |
| 9 | <script type="text/javascript" src="../dygraph-dev.js"></script> |
| 10 | <style> |
| 11 | html, body { |
| 12 | /* |
| 13 | max-width: 800px; |
| 14 | height: 100%; |
| 15 | margin-right: auto; |
| 16 | */ |
| 17 | margin-left: 100px; |
| 18 | } |
| 19 | </style> |
| 20 | </head> |
| 21 | <body> |
| 22 | <p>Mouseovers should work as expected (dots should align with mouse)</p> |
| 23 | <div id="demodiv"></div> |
| 24 | |
| 25 | <script type="text/javascript"> |
| 26 | g = new Dygraph( |
| 27 | document.getElementById("demodiv"), |
| 28 | function() { |
| 29 | var zp = function(x) { if (x < 10) return "0"+x; else return x; }; |
| 30 | var r = "date,parabola,line,another line,sine wave\n"; |
| 31 | for (var i=1; i<=31; i++) { |
| 32 | r += "200610" + zp(i); |
| 33 | r += "," + 10*(i*(31-i)); |
| 34 | r += "," + 10*(8*i); |
| 35 | r += "," + 10*(250 - 8*i); |
| 36 | r += "," + 10*(125 + 125 * Math.sin(0.3*i)); |
| 37 | r += "\n"; |
| 38 | } |
| 39 | return r; |
| 40 | }, |
| 41 | { |
| 42 | labelsKMB: true, |
| 43 | legend: 'always' |
| 44 | } |
| 45 | ); |
| 46 | </script> |
| 47 | </body> |
| 48 | </html> |