# Export Options

The Kendo UI for Angular Sankey diagram 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 [`saveAs`](https://www.telerik.com/kendo-angular-ui-develop/components/file-saver/api/saveas) method.

The Sankey diagram supports the following export options:

## Export to Image

The following example demonstrates how to save the Sankey diagram as a PNG image by using the [`exportImage`](https://www.telerik.com/kendo-angular-ui-develop/components/charts/api/sankeycomponent#exportimage) method.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/sankey/export-image/source.txt)

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 diagram is based on vector graphics.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/sankey/export-image-size/source.txt)

## Exporting to SVG

The following example demonstrates how to save the Sankey diagram as an SVG file by using the [`exportSVG`](https://www.telerik.com/kendo-angular-ui-develop/components/charts/api/sankeycomponent#exportsvg) method.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/sankey/export-svg/source.txt)

## Exporting to PDF

The [`exportPDF`](https://www.telerik.com/kendo-angular-ui-develop/components/charts/api/sankeycomponent) method from the [Drawing](https://www.telerik.com/kendo-angular-ui-develop/components/drawing) library takes a visual element and produces a PDF file out of it.

### Saving as PDF

The following example demonstrates how to save the Angular Sankey diagram as a PDF file by using the `exportPDF` method.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/sankey/export-pdf/source.txt)

### Fitting to Paper Size

If the rendered Sankey diagram is bigger than the exported PDF paper size, then the chart is clipped. To avoid this behavior, either:

* Set the `exportVisual` size, or
* Scale the drawing element, which is returned by the `exportVisual` method.

The following example demonstrates how to fit the exported Sankey diagram to the paper size of the PDF file.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/sankey/export-pdf-paper-size/source.txt)

## Exporting to Drawing Visuals

The [`exportVisual`](https://www.telerik.com/kendo-angular-ui-develop/components/charts/api/sankeycomponent#exportvisual) method returns a [Drawing](https://www.telerik.com/kendo-angular-ui-develop/components/drawing) scene which you can further process.

The following example demonstrates how to export the Sankey diagram as a Drawing visual scene by using the `exportVisual` method.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/sankey/export-visual/source.txt)

## Customize the Export

You can customize the export in the [`exportVisual`](https://www.telerik.com/kendo-angular-ui-develop/components/charts/api/sankeycomponent#exportVisual) method using the [`SankeyExportVisualOptions`](https://www.telerik.com/kendo-angular-ui-develop/components/charts/api/sankeyexportvisualoptions). The following options are available:

* `width`—Set the width of the exported visual.
* `height`—Set the height of the exported visual.
* `options`—Overrides the widget configuration with the provided [SankeyOptions](https://www.telerik.com/kendo-angular-ui-develop/components/charts/api/sankeyoptions) object.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/sankey/export-customization/source.txt)

## Suggested Links

* [Drawing](https://www.telerik.com/kendo-angular-ui-develop/components/drawing)
* [File Saver](https://www.telerik.com/kendo-angular-ui-develop/components/file-saver)
* [API Reference of the Sankey Diagram](https://www.telerik.com/kendo-angular-ui-develop/components/charts/api/sankeycomponent)
