zoom

Gets or sets the current zoom level of the diagram.

Parameters

zoom Number

The zoom factor.

point kendo.dataviz.diagram.Point

The point to zoom into or out of.

ReturnsNumber The current zoom level

Example - zoom Diagram dynamically

<button id="zoomBtn">Zoom Diagram</button>
<div id="diagram"></div>
<script>
  $("#zoomBtn").on("click", function(){
    var diagram = $("#diagram").getKendoDiagram();
    diagram.zoom(1.5);
  });
  $("#diagram").kendoDiagram({
    shapes: [{
      id: "1",
      x: 100,
      y: 20
    }, {
      id: "2",
      x: 350,
      y: 20
    }, {
      id: "3",
      x: 250,
      y: 200
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>
In this article