pan

Fired when the user pans the diagram.

Event Data

pan kendo.dataviz.diagram.Point

A point representing the pan distance.

e.sender kendo.dataviz.ui.Diagram

The widget instance which fired the event.

Example - handling the pan event

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapes:[
      {
        id:"1",
        content:{
          text: "State 1"
        },
        x: 20,
        y: 20
      },
      {
        id:"2",
        content: {
          text: "State 2"
        },
        x: 160,
        y: 20
      }
    ],
    connections:[
      {
        from: "1",
        to: "2"
      }
    ],
    pan: onPan
  });

  function onPan(e){
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Pan distance: " + e.pan);
  }
</script>
In this article