exportPDF

Exports the Sankey as a PDF file. The result can be saved using kendo.saveAs.

The export operation is asynchronous and returns a promise. The promise will be resolved with a PDF file encoded as a Data URI.

The available configuration options can be found in the PDFOptions api.

Example - Exporting the Sankey to a PDF file

<div id="sankey" style="width: 500px; height: 200px;"></div>
<script>
    $("#sankey").kendoSankey({
        data: {
            nodes: [
                { id: 1, label: { text: "Node 1" } },
                { id: 2, label: { text: "Node 2" } },
                { id: 3, label: { text: "Node 3" } }
            ],
            links: [
                { sourceId: 1, targetId: 3, value: 2 },
                { sourceId: 2, targetId: 3, value: 1 }
            ]
        }
    });

    var sankey = $("#sankey").getKendoSankey();
    sankey.exportPDF({ paperSize: "A5", landscape: true }).done(function(data) {
        kendo.saveAs({
            dataURI: data,
            fileName: "sankey.pdf"
        });
    });
</script>

Parameters

options kendo.drawing.PDFOptions (optional)Parameters for the exported PDF file.

ReturnsPromise A promise that will be resolved with a PDF file encoded as a Data URI.

In this article