Code comments and indentation fixes. connect-separated-points
authorRobert Konigsberg <konigsberg@google.com>
Fri, 27 Sep 2013 14:30:58 +0000 (10:30 -0400)
committerRobert Konigsberg <konigsberg@google.com>
Fri, 27 Sep 2013 14:30:58 +0000 (10:30 -0400)
auto_tests/tests/CanvasAssertions.js
auto_tests/tests/connect_separated_points.js

index 62a3f49..9550912 100644 (file)
@@ -185,6 +185,9 @@ CanvasAssertions.numLinesDrawn = function(proxy, color) {
   var num_lines = 0;
   for (var i = 0; i < proxy.calls__.length; i++) {
     var call = proxy.calls__[i];
+
+    // note: Don't simplify these two conditionals into one. The
+    // separation simplifies debugging tricky tests.
     if (call.name == "lineTo") {
       if (call.properties.strokeStyle == color) {
         num_lines++;
index f668ebc..95ef88e 100644 (file)
@@ -363,20 +363,20 @@ ConnectSeparatedPointsTestCase.prototype.testConnectSeparatedPointsPerSeries = f
   }
 
   var g = new Dygraph(document.getElementById("graph"),
-  [
-    [1, 10, 10, 10],
-    [2, 15, 11, 12],
-    [3, null, null, 12],
-    [4, 20, 14, null],
-    [5, 15, null, 17],
-    [6, 18, null, null],
-    [7, 12, 14, null]
-  ],
-  {
-    labels: ["Date","Series1","Series2","Series3"],
-    connectSeparatedPoints: false,
-    colors: ["#ff0000", "#00ff00", "#0000ff"]
-  });
+      [
+        [1, 10, 10, 10],
+        [2, 15, 11, 12],
+        [3, null, null, 12],
+        [4, 20, 14, null],
+        [5, 15, null, 17],
+        [6, 18, null, null],
+        [7, 12, 14, null]
+      ],
+      {
+        labels: ["Date","Series1","Series2","Series3"],
+        connectSeparatedPoints: false,
+        colors: ["#ff0000", "#00ff00", "#0000ff"]
+      });
 
   htx = g.hidden_ctx_;
   assertExpectedLinesDrawnPerSeries(htx, 4, 1, 2);