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>