this.height = this.element.height;
this.width = this.element.width;
+ this.elementContext.save();
+
// --- check whether everything is ok before we return
if (!this.isIE && !(DygraphCanvasRenderer.isSupported(this.element)))
throw "Canvas is not supported.";
context.clearRect(0, 0, this.width, this.height);
};
+DygraphCanvasRenderer.prototype.onDoneDrawing = function() {
+ // balances the save called in the constructor.
+ this.elementContext.restore();
+}
+
/**
* Checks whether the browser supports the <canvas> tag.
* @private
for (var j = 0; j < sets.length; j++) {
setName = setNames[j];
- if (opt_seriesName && setName != opt_seriesName) continue;
+ if (opt_seriesName && !(is_last && setName == opt_seriesName)) continue;
var points = sets[j];