points

Gets the intermediate points of the connection.

Example - configuring the points

<button id="getPointsBtn">Get Connection Points</button>
<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: 20, y: 180 }));
  var shape2 = diagram.addShape( new Shape({ x: 300, y: 180 }));

  var connection = new kendo.dataviz.diagram.Connection(shape1, shape2, {
    type: "polyline",
    points: [
      { x: 150, y: 100 },
      { x: 175, y: 150 },
      { x: 200, y: 100 }
    ],
    selectable: false
  });

  diagram.addConnection(connection);

  $("#getPointsBtn").on("click", function(){
    var connection = diagram.connections[0];
    console.log(connection.points());
  });
</script>

Returns

Array the intermediate points of the connection.

In this article
Not finding the help you need? Improve this article