New to Kendo UI for jQueryStart a free 30-day trial

Select

methods

Gets or sets the selected elements.

Parameters:elementskendo.dataviz.diagram.Connection|kendo.dataviz.diagram.Shape|Array

The diagram element(s) that should be selected.

optionsObject
options.addToSelectionBoolean

If set to true the newly selected items will be added to the existing selection. Otherwise a new selection set is created. The default is false.

Returns:Array

The selected diagram elements.

<button id="selectBtn">Select 3rd Shape</button> - adds the shape to the existing selection
<div id="diagram"></div>
<script>
  $("#selectBtn").on("click", function(){
    var diagram = $("#diagram").getKendoDiagram();
    diagram.select(diagram.shapes[2], {addToSelection: true});
  });
  $("#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: 160,
        y: 160
      }
    ],
    connections:[
      {
        from: "1",
        to: "2"
      },{
        from: "2",
        to: "3"
      }
    ]
  });
</script>
<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapes: [{
      id: "1"
    }]
  });
  var diagram = $("#diagram").getKendoDiagram();
  diagram.select(diagram.shapes[0]);
</script>
Not finding the help you need?
Contact Support