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 var fillStepPlotTestCase
= TestCase("fill-step-plot");
9 fillStepPlotTestCase
.prototype.setUp
= function() {
10 document
.body
.innerHTML
= "<div id='graph'></div>";
13 fillStepPlotTestCase
.origFunc
= Dygraph
.getContext
;
15 fillStepPlotTestCase
.prototype.setUp
= function() {
16 document
.body
.innerHTML
= "<div id='graph'></div>";
17 Dygraph
.getContext
= function(canvas
) {
18 return new Proxy(fillStepPlotTestCase
.origFunc(canvas
));
22 fillStepPlotTestCase
.prototype.tearDown
= function() {
23 Dygraph
.getContext
= fillStepPlotTestCase
.origFunc
;
27 fillStepPlotTestCase
.prototype.testFillStepPlotNullValues
= function() {
45 var graph
= document
.getElementById("graph");
46 var g
= new Dygraph(graph
, data
, opts
);
53 var xy1
= g
.toDomCoords(x1
, y1
);
54 var xy2
= g
.toDomCoords(x2
, y2
);
56 // Check if a line is drawn between the previous y and the bottom of the chart
57 CanvasAssertions
.assertLineDrawn(htx
, xy1
, xy2
, {});