viewport

The bounds of the diagramming canvas.

Returns

kendo.dataviz.diagram.Rect as viewport bounds

Example - get viewport bounds

<button id="viewportBtn">Get viewport bounds</button>
<div id="diagram"></div>
<script>
  $("#viewportBtn").on("click", function(){
    var diagram = $("#diagram").getKendoDiagram();
    var viewport = diagram.viewport();
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(viewport);
  });
  $("#diagram").kendoDiagram({
    zoom: 1.5,
    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