dataBound

Fired when the widget is bound to data from dataDource and connectionsDataSource.

The event handler function context (available via the this keyword) will be set to the widget instance.

Event Data

e.sender kendo.dataviz.ui.Diagram

Example - handling the dataBound event

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    dataSource: {
      data: [
        { id: 1, jobTitle: "President" },
        { id: 2, jobTitle: "VP Finance" }
      ],
      schema: {
        model: {
          id: "id",
          fields: {
            jobTitle: { type: "string" }
          }
        }
      }
    },
    connectionsDataSource: {
      data: [
        { id: 1, from: 1, to: 2 }
      ]
    },
    layout: {
      type: "tree",
      subtype: "tipover",
      underneathHorizontalOffset: 140
    },
    dataBound: onDataBound
  });

  function onDataBound(e){
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Bound a Diagram with " + this.shapes.length + " shapes.");
  }
</script>
In this article