really add test
authorDan Vanderkam <danvk@google.com>
Thu, 17 Dec 2009 16:08:30 +0000 (08:08 -0800)
committerDan Vanderkam <danvk@google.com>
Thu, 17 Dec 2009 16:08:30 +0000 (08:08 -0800)
tests/fillGraph.html [new file with mode: 0644]

diff --git a/tests/fillGraph.html b/tests/fillGraph.html
new file mode 100644 (file)
index 0000000..4730393
--- /dev/null
@@ -0,0 +1,64 @@
+<html>
+  <head>
+    <title>fillGraph</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>
+  </head>
+  <body>
+    <p>Filled, no error bars:</p>
+    <div id="div_g" style="width:600px; height:300px;"></div>
+
+    <p>Filled, negatives:</p>
+    <div id="div_g2" style="width:600px; height:300px;"></div>
+
+    <p>Filled, error bars:</p>
+    <div id="div_g3" style="width:600px; height:300px;"></div>
+
+    <script type="text/javascript">
+      new Dygraph(
+        document.getElementById("div_g"),
+        function() {
+          var ret = "X,Y1,Y2\n";
+          for (var i = 0; i < 100; i++) {
+            ret += i + "," + i + "," + (i * (100-i) * 100/(50*50)) + "\n";
+          }
+          return ret;
+        },
+        { fillGraph: true }
+      );
+
+      new Dygraph(
+        document.getElementById("div_g3"),
+        function() {
+          var ret = "X,Y1,Y2\n";
+          for (var i = 0; i < 100; i++) {
+            ret += i + "," + (i - 50) +
+            "," + (50 - i * (100-i) * 100/(50*50)) + "\n";
+          }
+          return ret;
+        },
+        { fillGraph: true }
+      );
+
+      new Dygraph(
+        document.getElementById("div_g2"),
+        function() {
+          var ret = "X,Y1,Y2\n";
+          for (var i = 0; i < 100; i++) {
+            ret += i + "," + i + ",10," +
+              (i * (100-i) * 100/(50*50)) + ",5\n";
+          }
+          return ret;
+        },
+        {
+          errorBars: true,
+          fillGraph: true
+        }
+      );
+    </script>
+  </body>
+</html>