Premium
The Chart provides support for Image, PDF, and SVG export using the Drawing package.
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:
In order to export a Chart component as a Drawing scene use the exportVisual method and pass a Chart instance and export options.
The following example demonstrates how to export the Chart as a Drawing visual scene by using the exportVisual
method.
Once you export the Chart as a Drawing scene, you can save this visual as an SVG by using the exportSVG
method of the Drawing package. The following example demonstrates how to achieve this.
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.
Exporting to PDFThe exportPDF
method from the Drawing library takes a visual element and produces a PDF file out of it.
Saving Charts in PDFCurrently, exporting the series pattern fills to PDF is not supported.
The following example demonstrates how to save the Chart as a PDF file by using the exportPDF
method.
If the rendered Chart is bigger than the exported PDF paper size, then the Chart is clipped. To avoid this behavior, either:
exportVisual
size, orexportVisual
method.The following example demonstrates how to fit the exported Chart to the paper size of the PDF file.
Exporting to SVGOnce you export the Chart as a Drawing scene, you can save this visual as an SVG by using the exportSVG
method of the Drawing package. The following example demonstrates how to achieve this.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4