Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
f6401bf6 DV |
2 | <html> |
3 | <head> | |
fd6b8dad | 4 | <link rel="stylesheet" href="../dist/dygraph.css"> |
f6401bf6 | 5 | <title>dateWindow</title> |
fbd6834a | 6 | <script type="text/javascript" src="../dist/dygraph.js"></script> |
7e5ddc94 | 7 | |
f6401bf6 DV |
8 | </head> |
9 | <body> | |
10 | <p>dateWindow is set to something other than an x-value in the data set. | |
3d29302c DV |
11 | Grid lines should still go through data points. In the second chart, there |
12 | should be lines going off the edge of the chart (to data points out of | |
13 | view).</p> | |
f6401bf6 | 14 | |
3d29302c DV |
15 | <div id="div_g1" style="width:900px; height:300px;"></div> |
16 | <div id="div_g2" style="width:900px; height:300px;"></div> | |
f6401bf6 DV |
17 | |
18 | <script type="text/javascript"> | |
19 | var data = []; | |
d56573af | 20 | for (var i = 1; i < 10; i++) { |
1e675df1 | 21 | data.push([new Date("2009/10/0" + i), i%2, i%3]); |
f6401bf6 DV |
22 | } |
23 | ||
3d29302c DV |
24 | g1 = new Dygraph( |
25 | document.getElementById("div_g1"), | |
26 | data, { | |
27 | dateWindow: [ Date.parse("2009/09/29 12:00:00"), | |
300c5ff0 DV |
28 | Date.parse("2009/10/10 12:00:00") ], |
29 | labels: [ 'Date', 'Y1', 'Y2' ] | |
3d29302c DV |
30 | } |
31 | ); | |
32 | ||
33 | g2 = new Dygraph( | |
34 | document.getElementById("div_g2"), | |
35 | data, { | |
36 | dateWindow: [ Date.parse("2009/10/01 12:00:00"), | |
300c5ff0 DV |
37 | Date.parse("2009/10/08 12:00:00") ], |
38 | labels: [ 'Date', 'Y1', 'Y2' ] | |
3d29302c DV |
39 | } |
40 | ); | |
f6401bf6 DV |
41 | </script> |
42 | </body> | |
43 | </html> |