shapeDefaults.source String

The path/URL to the shape image. Applicable when the type is set to "image".

Example - applying a default image for all shapes

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    layout: "layered",
    shapeDefaults: {
      type: "image",
      source: "https://demos.telerik.com/kendo-ui/html5-dashboard-sample-app/Content/Products/4.jpg",
      content: {
        color: "#fff"
      }
    },
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      }
    }, {
      id: "2",
      content: {
        text: "Tuesday"
      }
    }, {
      id: "3",
      content: {
        text: "Wednesday"
      }
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>
In this article
Not finding the help you need? Improve this article