Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
f6401bf6 DV |
2 | <html> |
3 | <head> | |
93a5bb4c | 4 | <link rel="stylesheet" href="../css/dygraph.css"> |
f6401bf6 | 5 | <title>dateWindow</title> |
7e5ddc94 DV |
6 | <!-- |
7 | For production (minified) code, use: | |
8 | <script type="text/javascript" src="dygraph-combined.js"></script> | |
9 | --> | |
fbd6834a | 10 | <script type="text/javascript" src="../dist/dygraph.js"></script> |
7e5ddc94 | 11 | |
f6401bf6 DV |
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"), | |
300c5ff0 DV |
32 | Date.parse("2009/10/10 12:00:00") ], |
33 | labels: [ 'Date', 'Y1', 'Y2' ] | |
3d29302c DV |
34 | } |
35 | ); | |
36 | ||
37 | g2 = new Dygraph( | |
38 | document.getElementById("div_g2"), | |
39 | data, { | |
40 | dateWindow: [ Date.parse("2009/10/01 12:00:00"), | |
300c5ff0 DV |
41 | Date.parse("2009/10/08 12:00:00") ], |
42 | labels: [ 'Date', 'Y1', 'Y2' ] | |
3d29302c DV |
43 | } |
44 | ); | |
f6401bf6 DV |
45 | </script> |
46 | </body> | |
47 | </html> |