fix some bugs that were breaking IE
[dygraphs.git] / tests / dateWindow.html
CommitLineData
f6401bf6
DV
1<html>
2 <head>
3 <title>dateWindow</title>
4 <!--[if IE]>
5 <script type="text/javascript" src="excanvas.js"></script>
6 <![endif]-->
7 <script type="text/javascript" src="../dygraph-combined.js"></script>
8 <script type="text/javascript" src="../dygraph-canvas.js"></script>
9 <script type="text/javascript" src="../dygraph.js"></script>
10 </head>
11 <body>
12 <p>dateWindow is set to something other than an x-value in the data set.
3d29302c
DV
13 Grid lines should still go through data points. In the second chart, there
14 should be lines going off the edge of the chart (to data points out of
15 view).</p>
f6401bf6 16
3d29302c
DV
17 <div id="div_g1" style="width:900px; height:300px;"></div>
18 <div id="div_g2" style="width:900px; height:300px;"></div>
f6401bf6
DV
19
20 <script type="text/javascript">
21 var data = [];
22 for (var i = 0; i < 10; i++) {
1e675df1 23 data.push([new Date("2009/10/0" + i), i%2, i%3]);
f6401bf6
DV
24 }
25
3d29302c
DV
26 g1 = new Dygraph(
27 document.getElementById("div_g1"),
28 data, {
29 dateWindow: [ Date.parse("2009/09/29 12:00:00"),
30 Date.parse("2009/10/10 12:00:00") ]
31 }
32 );
33
34 g2 = new Dygraph(
35 document.getElementById("div_g2"),
36 data, {
37 dateWindow: [ Date.parse("2009/10/01 12:00:00"),
38 Date.parse("2009/10/08 12:00:00") ]
39 }
40 );
f6401bf6 41 </script>
3d29302c
DV
42
43 <!--
44 To complete panning support:
45 1. Find a way to implement RoundTime() in Dygraph.prototype.GetXAxis().
46 2. Draw lines to points past the edge of the canvas.
47 -->
f6401bf6
DV
48 </body>
49</html>