X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-canvas.js;h=17908e396d7848edf5214beed29d84e17ccf0c23;hb=88bbada8ddcef3861b258b865be65ab579efbcfb;hp=b7a49a59405cad8f65d76e1be7d1dc21833b377f;hpb=dab1df042582391f79e784d42b6c367c787d5e28;p=dygraphs.git diff --git a/dygraph-canvas.js b/dygraph-canvas.js index b7a49a5..17908e3 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -52,7 +52,6 @@ var DygraphCanvasRenderer = function(dygraph, element, elementContext, layout) { this.layout = layout; this.element = element; this.elementContext = elementContext; - this.container = this.element.parentNode; this.height = this.element.height; this.width = this.element.width; @@ -64,8 +63,6 @@ var DygraphCanvasRenderer = function(dygraph, element, elementContext, layout) { // internal state this.area = layout.getPlotArea(); - this.container.style.position = "relative"; - this.container.style.width = this.width + "px"; // Set up a clipping area for the canvas (and the interaction canvas). // This ensures that we don't overdraw. @@ -691,7 +688,6 @@ DygraphCanvasRenderer._fillPlotter = function(e) { if (!g.getBooleanOption('fillGraph', setName)) continue; var stepPlot = g.getBooleanOption('stepPlot', setName); - var fillStepPlot = stepPlot && g.getBooleanOption("fillStepPlot", setName); var color = colors[setIdx]; var axis = g.axisPropertiesForSeries(setName); var axisY = 1.0 + axis.minyval * axis.yscale; @@ -717,7 +713,7 @@ DygraphCanvasRenderer._fillPlotter = function(e) { var last_x, is_first = true; while (iter.hasNext) { var point = iter.next(); - if (!Dygraph.isOK(point.y) && !fillStepPlot) { + 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; @@ -758,12 +754,9 @@ DygraphCanvasRenderer._fillPlotter = function(e) { } } else { - if (isNaN(point.canvasy) && fillStepPlot) - { + if (isNaN(point.canvasy) && stepPlot) { newYs = [ area.y + area.h, axisY ]; - } - else - { + } else { newYs = [ point.canvasy, axisY ]; } }