Home Forums Chart Support Export resolution – 1200 x 1800 Reply To: Export resolution – 1200 x 1800



With a few lines of JavaScript code, you can retain the size of the exported image with the help of devicePixelRatio. Take a look at the code-snippet given below.

chart.set("width", 1200 * (1 / window.devicePixelRatio), false);
chart.set("height", 1800 * (1 / window.devicePixelRatio));
chart.exportChart({ format: "jpg" });

Please refer to this Stackoverflow thread for more information on handling device / browser scaling in JavaScript.

Vishwas R
Team CanvasJS