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