templateString|Function
The template which renders the treeMap tile content.
The fields which can be used in the template are:
- dataItem - the original data item used to construct the point.
- text - the original tile text.
Example
<div id="treemap"></div>
<script>
$("#treemap").kendoTreeMap({
dataSource: [
{ name: "Technology", value: 50, percentage: 45 },
{ name: "Healthcare", value: 35, percentage: 32 },
{ name: "Finance", value: 25, percentage: 23 }
],
valueField: "value",
textField: "name",
template: (data) => `${data.text}<br/>Value: ${data.dataItem.value}<br/>${data.dataItem.percentage}%`
});
</script>
In this article