From: Jon Rowe Date: Thu, 27 Jun 2013 06:14:48 +0000 (+1000) Subject: force calculated width/heights back to context, for firefox compatibility X-Git-Tag: v1.0.2~18^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F142%2Fhead;p=thirdparty%2FChart.js.git force calculated width/heights back to context, for firefox compatibility --- diff --git a/Chart.js b/Chart.js index fb8fb0c54..3c217c87d 100644 --- a/Chart.js +++ b/Chart.js @@ -39,6 +39,11 @@ var width = this.width = computeDimension(context.canvas,'Width'); var height = this.height = computeDimension(context.canvas,'Height'); + + // Firefox requires this to work correctly + context.canvas.width = width; + context.canvas.height = height; + this.aspectRatio = this.width / this.height; //High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale. helpers.retinaScale(this);