X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-canvas.js;fp=dygraph-canvas.js;h=5bfbfbf14575944b187a8770a87a31a05134186c;hb=5ed8748f316f9750effc8eb79584737363f6b8e5;hp=6bf5fbcb457e187bb089ce0b93f395e1d9d6423f;hpb=ebf77a9fa6953523975f7ee608a05e1c66c43e47;p=dygraphs.git diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 6bf5fbc..5bfbfbf 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -716,7 +716,7 @@ DygraphCanvasRenderer._fillPlotter = function(e) { var last_x, is_first = true; while (iter.hasNext) { var point = iter.next(); - if (!Dygraph.isOK(point.y)) { + if (!Dygraph.isOK(point.y) && !stepPlot) { prevX = NaN; if (point.y_stacked !== null && !isNaN(point.y_stacked)) { baseline[point.canvasx] = area.h * point.y_stacked + area.y; @@ -757,7 +757,11 @@ DygraphCanvasRenderer._fillPlotter = function(e) { } } else { - newYs = [ point.canvasy, axisY ]; + if (isNaN(point.canvasy) && stepPlot) { + newYs = [ area.y + area.h, axisY ]; + } else { + newYs = [ point.canvasy, axisY ]; + } } if (!isNaN(prevX)) { ctx.moveTo(prevX, prevYs[0]);