TreeItem.Items

Syntax

Items: PP.List

Description

The Items property determines children of a hierarchical chart branch.

Comments

Property value is set from JSON and returned by the getItems method. Currently property value cannot be set with the setItems method.

Example

To execute the example the HTML page must contain the BubbleTree   component named «bubbleTree» (see «The BubbleTree component creation example» ). Get an element by ID, get its parent and change orientation of its label. Scroll the scene to the obtained item. Get chart branch children and set a new opacity value for these elements:

// Get data model
var model = bubbleTree.getModel()
// Get an element by ID
var item = model.getItem("EU");
// Open element with the EU ID
bubbleTree.drillTo(item);
var childs = item.getItems();
for (var i = 0; i < childs.getCount(); i++) {
    var childItem = childs.getItem(i);
    // Change element opacity
    childItem.setOpacity(0.5);
    childItem.draw();
}

After executing the example the scene is scrolled to the obtained item , opacity value is changed for the item children:

See also:

TreeItem