The Chart provides built-in support for Image, PDF, and SVG export.
As a result, you can send a Base64-encoded file to a service or save it on the client machine by using the File Saver package.
The Chart supports the following options:
- Exporting to an image
- Exporting to a drawing visual
- Exporting to the Portable Document Format (PDF)
- Exporting to the Scalable Vector Graphics (SVG) image format
The following example demonstrates how to save the Chart as a PNG image by using the
By default, the exported image is of the same size as the Chart DOM element. If required, you can export the file to a different resolution. If you change the image size, the image quality will not be affected because the rendering of the Chart is based on vector graphics.
The following example demonstrates how to export the Chart as a Drawing visual scene by using the
The following example demonstrates how to save the Chart as a PDF file by using the
If the rendered Chart is bigger than the exported PDF paper size, then the Chart is clipped. To avoid this behavior, either:
- Set the
- Scale the drawing element, which is returned by the
The following example demonstrates how to fit the exported Chart to the paper size of the PDF file.
The following example demonstrates how to save the Chart as an SVG file by using the