this.layout = layout;
this.element = element;
this.elementContext = elementContext;
- this.container = this.element.parentNode;
this.height = this.element.height;
this.width = this.element.width;
// 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.
for (var idx = 0; idx < pointsOnLine.length; idx++) {
var cb = pointsOnLine[idx];
ctx.save();
- drawPointCallback(
+ drawPointCallback.call(e.dygraph,
e.dygraph, e.setName, ctx, cb[0], cb[1], color, pointSize, cb[2]);
ctx.restore();
}
var fillGraph = g.getBooleanOption("fillGraph", setName);
if (fillGraph) {
- Dygraph.warn("Can't use fillGraph option with error bars");
+ console.warn("Can't use fillGraph option with error bars");
}
var ctx = e.drawingContext;
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;
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;
}
} else {
- if (isNaN(point.canvasy) && fillStepPlot)
- {
+ if (isNaN(point.canvasy) && stepPlot) {
newYs = [ area.y + area.h, axisY ];
- }
- else
- {
+ } else {
newYs = [ point.canvasy, axisY ];
}
}