Edit this page

connectionDefaults Object

Defines the defaults of the connections. Whenever a connection is created, the specified connectionDefaults will be used and merged with the (optional) configuration passed through the connection creation method.

Example - typical connectionDefaults

<div id="diagram"></div>
<script>
  var Point = kendo.dataviz.diagram.Point;
  $("#diagram").kendoDiagram({
    shapes:[
      {
        id:"1",
        content:{
          text: "State 1"
        },
        x: 20,
        y: 20
      },
      {
        id:"2",
        content: {
          text: "State 2"
        },
        x: 160,
        y: 20
      },
      {
        id:"3",
        content: {
          text: "State 3"
        },
        x: 60,
        y: 160
      }
    ],
    connections:[
      {
        from: new Point(100,100),
        to: new Point(100,200)
      },
      {
        from: "1",
        to: "2"
      }
    ],
    connectionDefaults: {
      stroke: {
        color: "#979797",
        width: 1
      },
      type:"polyline",
      startCap: "FilledCircle",
      endCap: "ArrowEnd"
    }
  });
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy