allow dateWindow to be set explicitly in layout (previously it was deduced from the...
[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.
13 Grid lines should still go through data points.</p>
14
15 <div id="div_g" style="width:600px; height:300px;"></div>
16
17 <script type="text/javascript">
18 var data = [];
19 for (var i = 0; i < 10; i++) {
20 data.push([i, i%2, i%3]);
21 }
22
23 g = new Dygraph(
24 document.getElementById("div_g"),
25 data, {
26 dateWindow: [ -15, 15 ]
27 }
28 );
29 </script>
30 </body>
31</html>