-SimpleDrawingTestCase.prototype.testSeparatedPointsDontDraw_expanded_connected = function() {
- var graph = document.getElementById("graph");
- var g = new Dygraph(
- graph,
- [[0, 10],
- [1, 11],
- [2, null],
- [3, 13],
- [4, 14]],
- { colors: ['blue'], connectSeparatedPoints: true});
- var htx = g.hidden_ctx_;
- var num_lines = 0;
- var lines = CanvasAssertions.getLinesDrawn(htx);
- for (var idx = 0; idx < lines.length; idx++) {
- var line = lines[idx];
- var color = line[1].properties.strokeStyle;
- if (color === "#ff0000" || color === "#0000ff") {
- console.log(line[0].args, line[1].args, color);
- }
- }
+ var sampler = new PixelSampler(g);
+ assert.deepEqual([255,0,0,255], sampler.colorAtPixel(x, y));
+ assert.deepEqual([255,0,0,255], sampler.colorAtPixel(x, y - 1));
+ assert.deepEqual([255,0,0,255], sampler.colorAtPixel(x, y - 2));
+
+ // TODO(danvk): figure out a good way to restore this test.
+ // assert.equal(29, CanvasAssertions.numLinesDrawn(htx, "#ff0000"));
+ g.destroy(); // to balance context saves and destroys.
+ CanvasAssertions.assertBalancedSaveRestore(htx);
+});