Can I export a chart on the client-side, i.e., within the browser?

Yes. To do this, you must set the render output to Canvas and view the image as a PNG.

In the render method, add an output attribute and set the value to 'canvas'.

zingchart.render({
 id : 'myChart',
 data : myConfig,
 height : 400,
 width : 600,
 output : 'canvas',
});

Next, right-click on the chart to bring up the context menu. Select View as PNG, and the image will appear on top of the chart. You can then save or copy the image. See the below demo.

Have more questions? Submit a request

0 Comments

Article is closed for comments.