legend Object

The legend configuration options of the Sankey.

Example - Setting the legend of the Sankey

<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 }
            ]
        },
        legend: {
            background: "white",
            border: { color: "black", dashType: "solid", width: 1 },
            labels: {
                color: "black",
                font: "12px Arial,Helvetica,sans-serif",
            },
            position: "right",
            title: {
                align: "center",
                background: "white",
                color: "black",
                font: "bold 16px Arial,Helvetica,sans-serif",
                position: "bottom",
                text: "Legend",
            }
        }
    });
</script>
In this article