# Export Options

The KendoReact 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`](https://www.telerik.com/kendo-react-ui-develop/components/charts/api/sankeyhandle#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](https://www.telerik.com/kendo-react-ui-develop/components/drawing) library and saves them using the [File Saver](https://www.telerik.com/kendo-react-ui-develop/components/filesaver) component's [`saveAs`](https://www.telerik.com/kendo-react-ui-develop/components/filesaver/api/saveas) method.

## Export to Image

Export the Sankey visual as an Image by using the [`exportImage`](https://www.telerik.com/kendo-react-ui-develop/components/drawing/api/exportimage) method and save it using the [`saveAs`](https://www.telerik.com/kendo-react-ui-develop/components/filesaver/api/saveas) method.

[Demo Source](https://demos.telerik.com/kendo-react-ui/charts/sankey/export/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 chart is based on vector graphics.

The following example demonstrates how to export the Sankey chart to a custom resolution using the `exportVisual` size option.

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

## Export to SVG

Export the Sankey visual as an SVG by using the [`exportSVG`](https://www.telerik.com/kendo-react-ui-develop/components/drawing/api/exportsvg) method and save it using the [`saveAs`](https://www.telerik.com/kendo-react-ui-develop/components/filesaver/api/saveas) method.

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

## Export to PDF

Export the Sankey visual as a PDF by using the [`exportPDF`](https://www.telerik.com/kendo-react-ui-develop/components/drawing/api/pdf/exportpdf) method and save it using the [`saveAs`](https://www.telerik.com/kendo-react-ui-develop/components/filesaver/api/saveas) method.

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

### 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 `exportVisual` size, or
* Scale the drawing element, which is returned by the `exportVisual` method.

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

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

## Customize the Export

You can customize the export in the [`exportVisual`](https://www.telerik.com/kendo-react-ui-develop/components/charts/api/sankeyhandle#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 the [`SankeyOptions`](https://www.telerik.com/kendo-react-ui-develop/components/charts/api/sankeyoptions).

The following example demonstrates how to customize the exported Sankey visual by specifying a custom `width`, `height`, and rendering `options` through `SankeyExportVisualOptions`.

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

## Suggested Links

* [Drawing](https://www.telerik.com/kendo-react-ui-develop/components/drawing)
* [File Saver](https://www.telerik.com/kendo-react-ui-develop/components/filesaver)
* [API Reference of the Sankey chart](https://www.telerik.com/kendo-react-ui-develop/components/charts/api/sankeyprops)
