Merge branch 'master' of https://github.com/kberg/dygraphs
[dygraphs.git] / tests / dateWindow.html
CommitLineData
54425b14 1<!DOCTYPE html>
f6401bf6
DV
2<html>
3 <head>
10494b48 4 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
f6401bf6
DV
5 <title>dateWindow</title>
6 <!--[if IE]>
a2b2c3a1 7 <script type="text/javascript" src="../excanvas.js"></script>
f6401bf6 8 <![endif]-->
7e5ddc94
DV
9 <!--
10 For production (minified) code, use:
11 <script type="text/javascript" src="dygraph-combined.js"></script>
12 -->
13 <script type="text/javascript" src="../dygraph-dev.js"></script>
14
f6401bf6
DV
15 </head>
16 <body>
17 <p>dateWindow is set to something other than an x-value in the data set.
3d29302c
DV
18 Grid lines should still go through data points. In the second chart, there
19 should be lines going off the edge of the chart (to data points out of
20 view).</p>
f6401bf6 21
3d29302c
DV
22 <div id="div_g1" style="width:900px; height:300px;"></div>
23 <div id="div_g2" style="width:900px; height:300px;"></div>
f6401bf6
DV
24
25 <script type="text/javascript">
26 var data = [];
d56573af 27 for (var i = 1; i < 10; i++) {
1e675df1 28 data.push([new Date("2009/10/0" + i), i%2, i%3]);
f6401bf6
DV
29 }
30
3d29302c
DV
31 g1 = new Dygraph(
32 document.getElementById("div_g1"),
33 data, {
34 dateWindow: [ Date.parse("2009/09/29 12:00:00"),
35 Date.parse("2009/10/10 12:00:00") ]
36 }
37 );
38
39 g2 = new Dygraph(
40 document.getElementById("div_g2"),
41 data, {
42 dateWindow: [ Date.parse("2009/10/01 12:00:00"),
43 Date.parse("2009/10/08 12:00:00") ]
44 }
45 );
f6401bf6
DV
46 </script>
47 </body>
48</html>