Export Options
The Kendo UI for Vue Sankey diagram allows you to export its contents as an Image, SVG, or PDF file.
Regardless of the required export format, you can use the exportVisual method to export the visuals of the Sankey component. The component exports the visuals as an Image, SVG, or PDF by using the Drawing library and saves them using the File Saver component's saveAs method.
Export to Image
Export the Sankey visual as an Image by using the exportImage method and save it using the saveAs method.
By default, the exported image is of the same size as the Sankey 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 Sankey chart is based on vector graphics.
Export to SVG
Export the Sankey visual as an SVG by using the exportSVG method and save it using the saveAs method.
Export to PDF
Export the Sankey visual as a PDF by using the exportPDF method and save it using the saveAs method.
Fitting to Paper Size
If the rendered Sankey Chart is bigger than the exported PDF paper size, then the chart is clipped. To avoid this behavior, either:
- Set the
exportVisualsize, or - Scale the drawing element, which is returned by the
exportVisualmethod.
The following example demonstrates how to fit the exported Sankey Chart to the paper size of the PDF file.
Customize the Export
You can customize the export in the exportVisual method using the SankeyExportVisualOptions. The following options are available:
width—Set the width of the exported visual.height—Set the height of the exported visual.options—Set theSankeyOptions.