Level: Number
The Level property determines level of tree map item.
Use JSON or the setLevel method to set the property value, and the getLevel method to get the property value.
To execute this example, the page must contain the TreeMap component named treeMap (see Example of Creating the TreeMap Component). Get and show value of the item level, value of the item size setting and value of the item text setting:
// Get chart item with the index 3 var item = treeMap.getSceneItems()[3]; // Show item level console.log("Item level: " + item.getLevel()) // Show value of item size setting console.log("Value of item size setting: " + item.getSize()); // Show value of item text setting console.log("Value of item text setting:" + item.getText());
After the example execution the browser console shows values of the item level, item size setting and item text setting:
Item level: 3
Value of item size setting: 71.42857142857129
Value of item text setting:100
See also: