+};\r
+\r
+ConnectSeparatedPointsTestCase.prototype.testEdgePointsStacked = function() {\r
+ var opts = {\r
+ width: 480,\r
+ height: 320,\r
+// drawXGrid: false,\r
+// drawYGrid: false,\r
+// drawXAxis: false,\r
+// drawYAxis: false,\r
+// errorBars: false,\r
+ labels: ["x", "series1", "series2", "series3"],\r
+ connectSeparatedPoints: true,\r
+ drawPoints: true,\r
+ stackedGraph: true,\r
+ dateWindow: [1.5,6.5]\r
+ };\r
+\r
+ var data = [\r
+ [-7,null,1,0],\r
+ [-6,null,3,null],\r
+ [-5,null,3,null],\r
+ [-4,null,3,null],\r
+ [-3,null,3,null],\r
+ [-2,null,3,null],\r
+ [-1,null,3,null],\r
+ [0,null,3,null],\r
+ [1,null,3,null],\r
+ [2,null,1,3],\r
+ [3,3,1,1],\r
+ [4,4,2,2],\r
+ [5,3,2,2],\r
+ [6,3,1,3],\r
+ [7,4,null,2],\r
+ [8,5,2,1],\r
+ ];\r
+\r
+ var graph = document.getElementById("graph");\r
+ var g = new Dygraph(graph, data, opts);\r
+ \r
+ htx = g.hidden_ctx_;\r
+\r
+ var attrs = {}; \r
+\r
+ //Test if series1 is drawn correctly.\r
+ //------------------------------------\r
+ \r
+ // The first point of the first series\r
+ var x1 = data[0][0];\r
+ var y1 = data[0][1];\r
+ var xy1 = g.toDomCoords(x1, y1);\r
+ \r
+ // The third (the second valid) point of the first series\r
+ // This series has no value at the second position.\r
+ var x2 = data[9][0];\r
+ var y2 = data[9][1];\r
+ var xy2 = g.toDomCoords(x2, y2);\r
+ \r
+ // Check if both points are connected at the left edge of the canvas and if the option "connectSeparatedPoints" works properly\r
+ // even if the point is outside the visible range and only one series has a valid value for this point.\r
+ CanvasAssertions.assertLineDrawn(htx, xy1, xy2, attrs);\r