1c4314555b54884babcaea28d8d630ea919b60d2
2 * @fileoverview Test if you give null values to dygraph with stepPlot
3 * and fillGraph options enabled
5 * @author benoitboivin.pro@gmail.com (Benoit Boivin)
7 import Dygraph from
'../../src/dygraph';
8 import * as utils from
'../../src/dygraph-utils';
9 import CanvasAssertions from
'./CanvasAssertions';
10 import Proxy from
'./Proxy';
12 describe("fill-step-plot", function() {
16 var origFunc
= utils
.getContext
;
18 beforeEach(function() {
19 utils
.getContext
= function(canvas
) {
20 return new Proxy(origFunc(canvas
));
24 afterEach(function() {
25 utils
.getContext
= origFunc
;
29 it('testFillStepPlotNullValues', function() {
47 var graph
= document
.getElementById("graph");
48 var g
= new Dygraph(graph
, data
, opts
);
50 var htx
= g
.hidden_ctx_
;
55 var xy1
= g
.toDomCoords(x1
, y1
);
56 var xy2
= g
.toDomCoords(x2
, y2
);
58 // Check if a line is drawn between the previous y and the bottom of the chart
59 CanvasAssertions
.assertLineDrawn(htx
, xy1
, xy2
, {});