New to Kendo UI for AngularStart a free 30-day trial

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 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 method.

Change Theme
Theme
Loading ...

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.

Change Theme
Theme
Loading ...

Exporting to SVG

The following example demonstrates how to save the Sankey diagram as an SVG file by using the exportSVG method.

Change Theme
Theme
Loading ...

Exporting to PDF

The exportPDF method from the 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.

Change Theme
Theme
Loading ...

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.

Change Theme
Theme
Loading ...

Exporting to Drawing Visuals

The exportVisual method returns a 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.

Change Theme
Theme
Loading ...

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—Overrides the widget configuration with the provided SankeyOptions object.
Change Theme
Theme
Loading ...