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

Exports the Sankey visual as a Group.

Parameters:exportOptionsObject

The options for exporting the Sankey visual.

exportOptions.heightNumber

The height of the exported visual.

exportOptions.widthNumber

The width of the exported visual.

exportOptions.optionsObject

The Sankey options to be used for the exported visual. The options will extend and override the Sankey configuration.

Returns:Group

- The exported visual.

<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();
var visual = sankey.exportVisual();
console.log("Exported visual:", visual);
</script>
Example - Exporting the Sankey visual
<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();
    var visual = sankey.exportVisual({ width: 800, height: 600 });
    console.log(visual);
</script>
Not finding the help you need?
Contact Support