+ this.area = this.computeArea_();
+ 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.
+ var ctx = this.dygraph_.canvas_ctx_;
+ ctx.beginPath();
+ ctx.rect(this.area.x, this.area.y, this.area.w, this.area.h);
+ ctx.clip();
+
+ ctx = this.dygraph_.hidden_ctx_;
+ ctx.beginPath();
+ ctx.rect(this.area.x, this.area.y, this.area.w, this.area.h);
+ ctx.clip();
+};
+
+DygraphCanvasRenderer.prototype.attr_ = function(x) {
+ return this.dygraph_.attr_(x);
+};
+
+// Compute the box which the chart should be drawn in. This is the canvas's
+// box, less space needed for axis and chart labels.
+DygraphCanvasRenderer.prototype.computeArea_ = function() {
+ var area = {