Skip to content

ChartSvgExportOptions API

Extended documentation for the ChartSvgExportOptions interface with detailed information on the module's properties and available APIs.

Demos

Import

import { ChartSvgExportOptions } from '@mui/x-charts-pro'


The options to apply on the SVG export.

Properties

Optional

If true, the styles of the page the chart belongs to will be copied to the export iframe.
Copying styles is useful to ensure that the exported chart looks the same as it does on the page.

Type:boolean

Default:true


Optional

The name of the file without the extension.

Type:string

Default:The title of the document the chart belongs to


Optional

A nonce to be used for Content Security Policy (CSP) compliance.
If provided, this nonce will be added to any style elements created during the export process.

Type:string


Optional

Callback function that is called before the export is triggered.
It receives the SVG element to be exported, so it can be modified before serialization
(such as adding elements, updating styles, removing elements, etc.).

Type:(svg: SVGElement) => Promise<void> | void