make publish works
[dygraphs.git] / tests / css-positioning.html
CommitLineData
edef826a
DV
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>
e0629007
DV
11 /* Changing 'body' -> 'html, body' triggers a bug */
12 body {
edef826a
DV
13 margin-left: 100px;
14 }
e0629007
DV
15
16 .container {
17 text-align: center;
18 }
edef826a
DV
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">
e0629007
DV
26 function Data() {
27 var zp = function(x) { if (x < 10) return "0"+x; else return x; };
28 var r = "date,parabola,line,another line,sine wave\n";
29 for (var i=1; i<=31; i++) {
30 r += "200610" + zp(i);
31 r += "," + 10*(i*(31-i));
32 r += "," + 10*(8*i);
33 r += "," + 10*(250 - 8*i);
34 r += "," + 10*(125 + 125 * Math.sin(0.3*i));
35 r += "\n";
36 }
37 return r;
38 }
39
edef826a
DV
40 g = new Dygraph(
41 document.getElementById("demodiv"),
e0629007
DV
42 Data,
43 {
44 labelsKMB: true,
45 legend: 'always'
46 }
47 );
48 </script>
49
50 <br/>
51 <div class="container">
52 <div id="chart2"></div>
53 </div>
54
55 <script type="text/javascript">
56 g = new Dygraph(
57 document.getElementById("chart2"),
58 Data,
edef826a
DV
59 {
60 labelsKMB: true,
61 legend: 'always'
62 }
63 );
64 </script>
65</body>
66</html>