Saving chart images by API call.
We expose the APIs for triggering download via the AgChart class:
The AgChartInstance can be obtained using a React Ref to our <AgChartsReact /> tag, which
exposes a chart property.
This example demonstrates:
AgChartInstance.AgChart.download() to start a chart image download.AgChart.getImageDataURL() to create a base64-encoded image URL, and then open it in
a new tab.