uncover a bug in a test case
authorDan Vanderkam <danvdk@gmail.com>
Tue, 6 Apr 2010 17:11:14 +0000 (10:11 -0700)
committerDan Vanderkam <danvdk@gmail.com>
Tue, 6 Apr 2010 17:11:14 +0000 (10:11 -0700)
tests/small-range-zero.html

index 54ae28b..ff0a597 100644 (file)
                 });
 
     </script>
+    
+    <p>The second series (which is entirely zero) should be visible, and the
+    y-axis should go down to zero.</p>
+    <div id="blah2"></div>
+    <script type="text/javascript"> 
+        var data=[
+          ["2006-10-11",0,15228],
+          ["2006-10-12",0,15219],
+          ["2006-10-13",0,15225],
+          ["2006-10-14",0,15212],
+          ["2006-10-15",0,15211],
+          ["2006-10-16",0,15322],
+          ["2006-10-17",0,15414],
+          ["2006-10-18",0,15422],
+          ["2006-10-19",0,15434],
+          ["2006-10-20",0,15423]
+        ];
+        var str = "";
+        for (var i = 0; i < data.length; i++) {
+          str += data[i].join(",") + "\n";
+        }
+
+        new Dygraph(document.getElementById("blah2"),
+                    str,
+                    { labels: [ "date", "zero", "non-zero" ] });
+    </script>
   </body>
 </html>