Visualizer: PP.Ui.TreeMapItem
The Visualizer property determines visualizer of a tree map item.
Use JSON or the setVisualizer method to set the property value, and the getVisualizer 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). Show type of chart item visualizer, color of the first level heading, font color of the first level heading, and font size for the first level heading. Get and show names of the attributes for items colors factor, items height factor, items size factor and items text factor:
// Get type of chart item visualizer var visualizerType = treeMap.getVisualizer(); // Create a new instance of visualizer var visualizer = new visualizerType(); // Show name of visualizer class console.log("Visualizer class name: " + visualizer.getTypeName()); // Get and show background color for the first level header var backColor = treeMap.getBranchBackColor(1); console.log("Background color of first level header: R:" + backColor.R + " G:" + backColor.G + " B:" + backColor.B); // Get and show font color for the first level header var fontColor = treeMap.getBranchFontColor(1); console.log("Font color of first level header: R:" + fontColor.R + " G:" + fontColor.G + " B:" + fontColor.B); // Get and show font size for the first level header var fontSize = treeMap.getBranchFontSize(1); console.log("Font size of first level header: " + fontSize); // Get and show name of the attribute for items colors factor console.log("Name of the attribute for items colors factor: " + treeMap.getColorVisualTitle(false)); // Get and show name of the attribute for items height factor console.log("Name of the attribute for items height factor: " + treeMap.getHeightVisualTitle(false)); // Get and show name of the attribute for items size factor console.log("Name of the attribute for items size factor: " + treeMap.getSizeVisualTitle(false)); // Get and show name of the attribute for items text factor console.log("Name of the attribute for items text factor: " + treeMap.getTextVisualTitle(false));
After the example execution the browser console shows the following data: type of chart item visualizer, background color for the first level heading, font color for the first level heading, font size for the first level heading, as well as attribute names for items colors factor, items height factor, items size factor and items text factor:
Visualizer class name: TreeMapItem
Background color of first level header: R:223 G:225 B:240
Font color of first level header: R:0 G:9 B:16
Font size of first level header: 12
Name of the attribute for items colors factor: Value
Name of the attribute for items height factor: Value
Name of the attribute for items size factor: Value
Name of the attribute for items text factor: Value
See also: