ZingChart: How do I export a chart as a static image?

Default Behavior (client side)

The default behavior for (svg & canvas render modes) is to use a client side export. When you right click on the chart and export it will convert the chart to a blob and export the chart in the client. To export the chart manually, right-click on the chart to bring up the context menu. You can download the image as a PNG, PDF, or SVG file.

Relative Documentation

  1. Chart Export Docs

Programatic Rendering

If you are NOT using a browser and want to render charts on the server, this is a  different approach. To export the chart programmatically, you need to use a server-
side image generator such as PhantomJS or puppeteer. 

PhantomJS

We created a ZingChart PhantomJS build to help users easily set up and generate static images. Alternatively, you can create your own customized export service by downloading PhantomJS directly from their site and connecting it to ZingChart. 

Puppeteer

ANOTHER alternative  would be to use headless chromes library puppeteer for "server" side rendering. You can spin up a headless version of the browser and take screenshots of web pages. Check it out.

Relative Documentation

  1. ZingChart PhantomJS Export Doc

  2. Google Chrome puppeteer

Relative Articles

  1. Exporting multiple charts into a single pdf

  2. Nodejs Export

  3. Rhino Export

Highly advanced users only:
If you require faster performance and/or strictly native server-side image generation, contact our sales team at sales@zingchart.com.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us