shapes Array
An array holding the Diagram shapes.
Example - using shapes field to access a shape by index
<button id="selectButton">Select Second Shape</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 secondShape = diagram.shapes[1];
secondShape.select(true);
});
</script>