clone

Returns a clone (with a different id) of the shape.

Returns

kendo.dataviz.diagram.Shape A clone of the current shape.

Example - cloning a shape

<div id="diagram"></div>
<script>
  var Shape = kendo.dataviz.diagram.Shape;

  $("#diagram").kendoDiagram();
  var diagram = $("#diagram").data("kendoDiagram");

  var shape = new Shape({
    id: 1,
    x: 40,
    y: 40,
    fill: "#c0f0fc",
    connectorDefaults: {
      width: 10,
      height: 10,
      fill: {
        color: "blue",
        opacity: 0.5
      },
      stroke: {
        width: 2,
        color: "lightgreen"
      },
      hover: {
        fill: {
          color: "yellow"
        },
        stroke: {
          color: "lightgreen"
        }
      }
    }
  });
  var shape2 = shape.clone();
  diagram.addShape(shape);
  diagram.addShape(shape2);
  shape2.position(new kendo.dataviz.diagram.Point(150, 150));
</script>
In this article