From: Wim Bruynooghe Date: Thu, 22 Nov 2012 08:15:42 +0000 (+0100) Subject: fixed spacings X-Git-Tag: v1.0.0~170^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=87196f1b575ca1cd6d5452fff1c08780f5661cba;p=dygraphs.git fixed spacings --- diff --git a/dygraph-range-selector.js b/dygraph-range-selector.js index 5b43d5d..b777470 100644 --- a/dygraph-range-selector.js +++ b/dygraph-range-selector.js @@ -506,27 +506,27 @@ DygraphRangeSelector.prototype.drawMiniPlot_ = function() { var y = ((dataPoint[1] !== null) ? (canvasHeight - (dataPoint[1] - combinedSeriesData.yMin)*yFact) : NaN); if (isFinite(x) && isFinite(y)) { if(prevX === null) { - ctx.lineTo(x, canvasHeight); - } - else if (stepPlot) { - ctx.lineTo(x, prevY); - } + ctx.lineTo(x, canvasHeight); + } + else if (stepPlot) { + ctx.lineTo(x, prevY); + } ctx.lineTo(x, y); prevX = x; - prevY = y; + prevY = y; } else { - if(prevX !== null) { - if (stepPlot) { - ctx.lineTo(x, prevY); - ctx.lineTo(x, canvasHeight); - } - else { - ctx.lineTo(prevX, canvasHeight); - } - } - prevX = prevY = null; - } + if(prevX !== null) { + if (stepPlot) { + ctx.lineTo(x, prevY); + ctx.lineTo(x, canvasHeight); + } + else { + ctx.lineTo(prevX, canvasHeight); + } + } + prevX = prevY = null; + } } ctx.lineTo(canvasWidth, canvasHeight); ctx.closePath();