The standard download functionality is housed within the chart.toolbar configuration. By default, this appears as a "hamburger" icon in the top-right corner of the chart.
To show or hide the entire toolbar, including the download options, set chart.toolbar.show to true or false .
For advanced use cases, like sending a chart image to a server or email, chart.dataURI() can return a base64-encoded string of the chart. apexcharts download button
async function downloadChart(chartId) // Find the chart instance by its ID const chartInstance = window.Apex._chartInstances.find(chart => chart.id === chartId); if (chartInstance) // Directly trigger the built-in PNG export chartInstance.chart.exports.exportToPng(); Use code with caution. Source: GitHub Discussion #797 Key Features and Limitations
You can call the exportToPng() method directly on your chart instance when a button is clicked: javascript The standard download functionality is housed within the
In dark themes, the download dropdown menu may require manual CSS overrides to ensure the background and text colors are readable. chart configuration | ApexCharts.js
Many modern dashboards use custom UI buttons located outside the chart container. To trigger a download from an external button, you can use the internal dataURI() method or built-in export functions provided by the ApexCharts instance. Example: External PNG Download For advanced use cases, like sending a chart
The ApexCharts download button is a built-in feature of the library's toolbar that allows users to export visualizations as SVG, PNG, or CSV files. While it is enabled by default, developers often need to customize its appearance, restrict certain file formats, or trigger downloads from external UI elements to match their application's design. Built-in Toolbar Configuration