Exporting Charts
ApexStock can export the current chart as an image. Export is part of the built-in toolbar, so no configuration is required to make it available.
The export button
An export button renders in the chart toolbar. Clicking it captures the chart, including the price pane, any active indicator panes, drawings, and trading overlays, and downloads it as an image file.
const apexStock = new ApexStock(document.querySelector('#chart'), {
chart: { height: 500 },
series: [{ name: 'ACME', data: candles }],
})
apexStock.render()
// The export button is now present in the toolbar.
How the capture works
The export serializes the chart's live SVG rather than screenshotting the canvas, so the output stays crisp at any size. Images embedded in the chart are inlined during the capture so the exported file is self-contained. The result is rendered to a raster image and downloaded.
What is captured
The export reflects the chart's current state: the active chart type, the visible zoom window, the active indicators, and the current theme. Set the view up the way you want it before exporting.