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

Legend.border

configuration

The border of the legend.

<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,
            border: {
                color: "#ff6358",
                width: 2,
                dashType: "solid"
            }
        }
    });
</script>

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

<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,
            border: {
                color: "#28b4c8",
                width: 2
            }
        }
    });
</script>

The dash type of the border.

The following dash types are supported:

  • "dash" - a line consisting of dashes
  • "dashDot" - a line consisting of a repeating pattern of dash-dot
  • "dot" - a line consisting of dots
  • "longDash" - a line consisting of a repeating pattern of long-dash
  • "longDashDot" - a line consisting of a repeating pattern of long-dash-dot
  • "longDashDotDot" - a line consisting of a repeating pattern of long-dash-dot-dot
  • "solid" - a solid line

Default: "solid"

<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,
        border: {
            dashType: "dash"
        }
    }
});
</script>

The width of the border in pixels. By default the border width is set to zero which means that the border will not appear.

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,
        border: {
            width: 2
        }
    }
});
</script>