dataBound

Fired when the widget is bound to data from its dataSource.

Event Data

e.sender kendo.dataviz.ui.TreeMap

The source widget instance.

Example - subscribe to the "dataBound" event during initialization

<div id="treemap"></div>
<script>
  $("#treemap").kendoTreeMap({
    dataSource: {
      data: [{
        name: "test",
        items: [{
          category: "foo",
          value: 1,
          color: "#3073ad"
        }]
      }]
    },
    valueField: "value",
    textField: "category",
    colorField: "color",
    dataBound: function(e) {
      console.log("DataBound");
    }
  });
</script>

Example - subscribe to the "dataBound" event after initialization

<div id="treemap"></div>
<script>
  function dataBound(e) {
    console.log("DataBound");
  }

  $("#treemap").kendoTreeMap({
    dataSource: {
      data: [{
        name: "test",
        items: [{
          category: "foo",
          value: 1,
          color: "#3073ad"
        }]
      }]
    },
    autoBind: false,
    valueField: "value",
    textField: "category",
    colorField: "color"
  });
  var treemap = $("#treemap").getKendoTreeMap();
  treemap.bind("dataBound", dataBound);
  treemap.dataSource.fetch();
</script>
In this article
Not finding the help you need? Improve this article