};
Dygraph.NAME = "Dygraph";
-Dygraph.VERSION = "2.0.0";
+Dygraph.VERSION = "2.1.0";
// Various default values
Dygraph.DEFAULT_ROLL_PERIOD = 1;
this.graphDiv.style.width = this.width_ + "px";
this.graphDiv.style.height = this.height_ + "px";
- var canvasScale = utils.getContextPixelRatio(this.canvas_ctx_);
+ var pixelRatioOption = this.getNumericOption('pixelRatio')
+
+ var canvasScale = pixelRatioOption || utils.getContextPixelRatio(this.canvas_ctx_);
this.canvas_.width = this.width_ * canvasScale;
this.canvas_.height = this.height_ * canvasScale;
this.canvas_.style.width = this.width_ + "px"; // for IE
this.canvas_ctx_.scale(canvasScale, canvasScale);
}
- var hiddenScale = utils.getContextPixelRatio(this.hidden_ctx_);
+ var hiddenScale = pixelRatioOption || utils.getContextPixelRatio(this.hidden_ctx_);
this.hidden_.width = this.width_ * hiddenScale;
this.hidden_.height = this.height_ * hiddenScale;
this.hidden_.style.width = this.width_ + "px"; // for IE
if (file) {
// This event indicates that the data is about to change, but hasn't yet.
- // TODO(danvk): support cancelation of the update via this event.
+ // TODO(danvk): support cancellation of the update via this event.
this.cascadeEvents_('dataWillUpdate', {});
this.file_ = file;