redraw

Redraws the Connection with the given options.

Parameters

options Object optionalThe new options for the connection. This object should follow the configuration structure.

Example - using redraw

<button id="redrawBtn">Redraw Connection</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: 100 }));
  var shape2 = diagram.addShape( new Shape({ x: 300, y: 100 }));

  var connection = new kendo.dataviz.diagram.Connection(shape1, shape2, {
    selectable: false
  });

  diagram.addConnection(connection);

  $("#redrawBtn").on("click", function(){
    var connection = diagram.connections[0];
    connection.redraw({
      stroke: {
        color: "orange",
        width: 3
      },
      content: {
        text: "Step 1"
      }
    });
  });
</script>
In this article