You can use two approaches to print and export the Chart: call methods, or add a built-in button with drop-down options. The supported export formats are PNG, PDF, JPEG, SVG, and GIF.
Use the exportTo(fileName, format) and print() methods to export and print the Chart. In this demo, two buttons below the chart implement the print and export functionality. A click on the "Print" button calls the Print dialog window, and a click on the "Export" button saves a file with the component to your local storage. You can specify the file name and format in the exportTo(fileName, format) method.
To automatically create a button with export and print options, use the export object and set its enabled property to true. If you want to disable printing, set the printingEnabled property to false.
Set the formats property to specify an array of available export formats. The fileName property allows you to specify the name of the exported file.
You can see how this approach works in the following demo: JSON Data.
Use the following events to handle export:
Occurs before the Chart export.
Occurs after the Chart export.