destroy
Prepares the TreeMap for safe removal from the DOM.
Detaches event handlers and removes data entries in order to avoid memory leaks.
Example
<div id="treemap"></div>
<script>
$("#treemap").kendoTreeMap({
dataSource: [
{ name: "Item 1", value: 30 },
{ name: "Item 2", value: 25 },
{ name: "Item 3", value: 20 }
],
valueField: "value",
textField: "name"
});
var treemap = $("#treemap").getKendoTreeMap();
treemap.destroy();
</script>
In this article