png()
Description
Exports a chart to a PNG file
png(config?: object): void;
Parameters:
config
- (optional) an object with export settings. You can specify the following settings for export to PNG:url?: string
- (optional) the url of the service that executes export and returns an exported file. This setting is optional, you should use it only if you need to specify the path to your local export service. The default value ishttps://export.dhtmlx.com/chart/png/8.0.0
name?: string
- (optional) the name of the exported file
Example
// default export
chart.export.png();
// export with config settings
chart.export.png({
url: "https://export.dhtmlx.com/chart/png/8.0.0",
name: "result.png"
});
Related samples: Chart. Export. Export to PDF/PNG
Change log: The method was added in v8.0