Color: PP.SolidColorBrush || String
The Color property sets color of a tree map item.
Use JSON or the setColor method to set the property value, and the getColor 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). Fill the chart item with the index 3 with red color, redraw the item, get its container and change its opacity:
// Get chart item with the index 3
var item = treeMap.getSceneItems()[3];
// Fill the item with red color
item.setColor("#FF0000");
// Redraw the item
item.draw()
// Get item container
var container = item.getContainer();
// Change opacity of item container
container.setOpacity(0.7);
After the example execution the chart item with the index 3 changes color and is redrawn, opacity of the item container is changed:

See also: