Edit this page

connections Array

An array holding the Diagram connections.

Example - using connections field to access a connection by index

<button id="selectButton">Select Second Connection</button>
<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    zoomRate: 0.5,
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      },
      x: 100,
      y: 20
    }, {
      id: "2",
      content: {
        text: "Tuesday"
      },
      x: 350,
      y: 20
    }, {
      id: "3",
      content: {
        text: "Wednesday"
      },
      x: 250,
      y: 200
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });

  $("#selectButton").on("click", function(){
    var diagram = $("#diagram").getKendoDiagram();
    var secondConnection = diagram.connections[1];

    secondConnection.select(true);
  });
</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