IsLeaf: Boolean
The IsLeaf property determines if the tree map item is a branch or a leaf.
Use JSON or the setIsLeaf method to set the property value, and the getIsLeaf or isLeaf method to get the property value.
If this property is true the item is a leaf, otherwise it is a branch.
By default this property is set to true.
To execute this example, the page must contain the TreeMap component named treeMap (see Example of Creating the TreeMap Component). Convert the chart item with the index 3 to a branch, update the item class:
// Get the leaf chart item with the index 3 var item = treeMap.getSceneItems()[3]; // Convert this item into a branch item.setIsLeaf(false); // Update item class item.updateClass()
After the example execution chart item is converted to a branch, and class of this item is updated:
See also: