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

Adds the given Connection to the diagram.

Parameters:connectionObject

The Connection instance to be added to the diagram.

<div id="diagram"></div>
<script>
  var Shape = kendo.dataviz.diagram.Shape;
  $("#diagram").kendoDiagram();

  var diagram = $("#diagram").data("kendoDiagram");
  var shape1 = diagram.addShape( new Shape({x:100, y:100, fill: "red"}));
  var shape2 = diagram.addShape( new Shape({x:300, y:200, fill: "red"}));

  var connection = new kendo.dataviz.diagram.Connection(shape1, shape2, $.extend(true, {}, diagram.options.connectionDefaults,{ stroke: { color: "red" }}));
  diagram.addConnection(connection);
</script>
Not finding the help you need?
Contact Support