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

Shapes.fill

configuration

Defines the background fill options of the shape.

shapes.fill

String|Object
<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    layout: "tree",
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      },
      fill: {
        color: "lime"
      }
    }, {
      id: "2",
      content: {
        text: "Tuesday"
      },
      fill: {
        color: "blue",
        opacity: 0.5
      }
    }, {
      id: "3",
      fill: {
        opacity: 0.5
      },
      content: {
        text: "Wednesday"
      }
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>

Defines the fill color of the shape.

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [{
        id: "1",
        x: 100,
        y: 100,
        content: { text: "Shape 1" },
        fill: {
            color: "#FF6347"
        }
    }]
});
</script>

Defines the gradient fill of the shape.

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    layout: "tree",
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      },
      fill: {
        gradient: {
          type: "radial",
          center: [0.5, 0.5],
          radius: 0.9,
          stops: [
            {
              offset: 0,
              color: "lightblue",
              opacity: 0.5
            }, {
              offset: 0.5,
              color: "purple",
              opacity: 0.8
            }
          ]
        }
      }
    }, {
      id: "2",
      content: {
        text: "Tuesday"
      }
    }, {
      id: "3",
      content: {
        text: "Wednesday"
      }
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>

Defines the fill opacity of the shape.

Default: 1

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapes: [{
        id: "1",
        x: 100,
        y: 100,
        content: { text: "Shape 1" },
        fill: {
            opacity: 0.5
        }
    }]
});
</script>