legend.alignString(default: "start")

The alignment of the legend. The supported values are:

  • "start" - The legend is aligned to the start.
  • "center" - The legend is aligned to the center.
  • "end" - The legend is aligned to the end.

Example

<div id="sankey" style="width: 500px; height: 300px;"></div>
<script>
    $("#sankey").kendoSankey({
        data: {
            nodes: [
                { id: 1, label: { text: "Node 1" }, color: "#ff6358" },
                { id: 2, label: { text: "Node 2" }, color: "#1f8ef1" }
            ],
            links: [
                { sourceId: 1, targetId: 2, value: 10 }
            ]
        },
        legend: {
            visible: true,
            align: "center"
        }
    });
</script>
In this article
legend.align
Not finding the help you need?
Contact Support