resizing test
authorDan Vanderkam <danvdk@gmail.com>
Mon, 14 Dec 2009 08:56:05 +0000 (00:56 -0800)
committerDan Vanderkam <danvdk@gmail.com>
Mon, 14 Dec 2009 08:56:05 +0000 (00:56 -0800)
tests/resize.html [new file with mode: 0644]

diff --git a/tests/resize.html b/tests/resize.html
new file mode 100644 (file)
index 0000000..467fed4
--- /dev/null
@@ -0,0 +1,29 @@
+<html>
+  <head>
+    <title>resize the window</title>
+    <!--[if IE]>
+    <script type="text/javascript" src="excanvas.js"></script>
+    <![endif]-->
+    <script type="text/javascript" src="../dygraph-combined.js"></script>
+    <script type="text/javascript" src="../dygraph-canvas.js"></script>
+    <script type="text/javascript" src="../dygraph.js"></script>
+    <script type="text/javascript" src="data.js"></script>
+  </head>
+  <body>
+    <div id="div_g" style="width:100%; height:100%"></div>
+
+    <script type="text/javascript">
+      g = new Dygraph(
+            document.getElementById("div_g"),
+            NoisyData, {
+              rollPeriod: 7,
+              errorBars: true
+            }
+          );
+
+      window.onresize = function() {
+        g.resize();
+      }
+    </script>
+  </body>
+</html>