New to Kendo UI for jQuery? Start a free 30-day trial

Destroy

methods

Prepares the TreeMap for safe removal from the DOM.

Detaches event handlers and removes data entries in order to avoid memory leaks.

<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>
Not finding the help you need?
Contact Support