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

Labels.padding

configuration

The padding of the label.

labels.padding

Number|Object

Default: 0

<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" } }
            ],
            links: [
                { sourceId: 1, targetId: 2, value: 10 }
            ]
        },
        labels: {
            padding: {
                top: 5,
                bottom: 5,
                left: 10,
                right: 10
            },
            border: {
                color: "#ff6358",
                width: 1
            }
        }
    });
</script>

The bottom padding of the label.

Default: 0

<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" } }
            ],
            links: [
                { sourceId: 1, targetId: 2, value: 10 }
            ]
        },
        labels: {
            padding: {
                bottom: 10
            },
            border: {
                color: "#ff6358",
                width: 1
            }
        }
    });
</script>

The left padding of the label.

Default: 0

<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" } }
            ],
            links: [
                { sourceId: 1, targetId: 2, value: 10 }
            ]
        },
        labels: {
            padding: {
                left: 12
            },
            border: {
                color: "#ff6358",
                width: 1
            }
        }
    });
</script>

The right padding of the label.

Default: 0

<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" } }
            ],
            links: [
                { sourceId: 1, targetId: 2, value: 10 }
            ]
        },
        labels: {
            padding: {
                right: 12
            },
            border: {
                color: "#ff6358",
                width: 1
            }
        }
    });
</script>

The top padding of the label.

Default: 0

<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" } }
            ],
            links: [
                { sourceId: 1, targetId: 2, value: 10 }
            ]
        },
        labels: {
            padding: {
                top: 8
            },
            border: {
                color: "#ff6358",
                width: 1
            }
        }
    });
</script>