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){
    console.log("Pan distance: " + e.pan);
  }
</script>
In this article
Not finding the help you need? Improve this article