AG Studio Launch Week 🚀🚀🚀 28 Sep - 2 Oct 2026 🚀🚀🚀 Join now

JavaScript ChartsDownload

Version 14.2.0

Saving chart images by API call.

Download API Copy Link

We expose the APIs for triggering download via the AgCharts class:

download Function
Starts a browser-based image download for the given `AgChartInstance`. Returns a `Promise` that resolves once the download has been initiated.
getImageDataURL Function
Returns a base64-encoded image data URL for the given `AgChartInstance`.

This example demonstrates:

  • How to obtain a reference to an AgChartInstance.
  • How to use AgChartInstance.download() to start a chart image download.
  • How to use AgChartInstance.getImageDataURL() to create a base64-encoded image URL, and then open it in a new tab.