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

Legend.labels

configuration

The Sankey legend label configuration.

<div id="sankey"></div>
<script>
$("#sankey").kendoSankey({
    data: {
        nodes: [
            { id: 1, label: { text: "Solar" } },
            { id: 2, label: { text: "Electricity" } }
        ],
        links: [
            { sourceId: 1, targetId: 2, value: 40 }
        ]
    },
    legend: {
        visible: true,
        labels: {
            color: "#333333",
            font: "14px Arial"
        }
    }
});
</script>

The text color of the labels. Accepts a valid CSS color string, including hex and rgb.

Default: "black"

<div id="sankey"></div>
<script>
$("#sankey").kendoSankey({
    data: {
        nodes: [
            { id: 1, label: { text: "Solar" } },
            { id: 2, label: { text: "Electricity" } }
        ],
        links: [
            { sourceId: 1, targetId: 2, value: 40 }
        ]
    },
    legend: {
        visible: true,
        labels: {
            color: "#ff6358"
        }
    }
});
</script>

The font style of the labels. Accepts a valid CSS color string, for example "20px 'Courier New'".

Default: "12px Arial,Helvetica,sans-serif"

<div id="sankey"></div>
<script>
$("#sankey").kendoSankey({
    data: {
        nodes: [
            { id: 1, label: { text: "Solar" } },
            { id: 2, label: { text: "Electricity" } }
        ],
        links: [
            { sourceId: 1, targetId: 2, value: 40 }
        ]
    },
    legend: {
        visible: true,
        labels: {
            font: "16px Arial, sans-serif"
        }
    }
});
</script>

The margin of the labels. A numeric value will set all margins.

Default: 0

<div id="sankey"></div>
<script>
$("#sankey").kendoSankey({
    data: {
        nodes: [
            { id: 1, label: { text: "Solar" } },
            { id: 2, label: { text: "Electricity" } }
        ],
        links: [
            { sourceId: 1, targetId: 2, value: 40 }
        ]
    },
    legend: {
        visible: true,
        labels: {
            margin: 10
        }
    }
});
</script>

The padding of the labels. A numeric value will set all paddings.

Default: 0

<div id="sankey"></div>
<script>
$("#sankey").kendoSankey({
    data: {
        nodes: [
            { id: 1, label: { text: "Solar" } },
            { id: 2, label: { text: "Electricity" } }
        ],
        links: [
            { sourceId: 1, targetId: 2, value: 40 }
        ]
    },
    legend: {
        visible: true,
        labels: {
            padding: 8
        }
    }
});
</script>