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

Fill

configuration

Defines the fill options of the rectangle.

fill

String|Object
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [{
        type: "rectangle",
        x: 100,
        y: 100,
        width: 200,
        height: 100,
        fill: {
            color: "#ff6358",
            opacity: 0.8
        }
    }]
});
</script>

Defines the fill color of the rectangle.

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [{
        type: "rectangle",
        x: 100,
        y: 100,
        width: 200,
        height: 100,
        fill: {
            color: "#0099ff"
        }
    }]
});
</script>

Defines the gradient fill of the shape.

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [{
        type: "rectangle",
        x: 100,
        y: 100,
        width: 200,
        height: 100,
        fill: {
            gradient: {
                type: "linear",
                start: [0, 0],
                end: [1, 1],
                stops: [
                    { offset: 0, color: "#ff6358" },
                    { offset: 1, color: "#ffd246" }
                ]
            }
        }
    }]
});
</script>

Defines the fill opacity of the rectangle.

Default: 1

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [{
        type: "rectangle",
        x: 100,
        y: 100,
        width: 200,
        height: 100,
        fill: {
            color: "#ff6358",
            opacity: 0.5
        }
    }]
});
</script>