ctx.canvas.width = width * pixelRatio;
ctx.scale(pixelRatio, pixelRatio);
- ctx.canvas.style.width = width + 'px';
- ctx.canvas.style.height = height + 'px';
-
// Store the device pixel ratio so that we can go backwards in `destroy`.
// The devicePixelRatio changes with zoom, so there are no guarantees that it is the same
// when destroy is called
chart.originalDevicePixelRatio = chart.originalDevicePixelRatio || pixelRatio;
}
+
+ ctx.canvas.style.width = width + 'px';
+ ctx.canvas.style.height = height + 'px';
};
//-- Canvas methods
helpers.clear = function(chart) {