This demo shows options that you can use to colorize TreeMap tiles. To see each option, use the drop-down editor below the component.
This colorization algorithm paints each tile within a group in a color from the palette. When there are multiple groups, the way in which groups are colorized depends on the colorizeGroups property setting:
If you choose this algorithm, the palette should contain only two colors that the component uses to colorize the smallest and the largest tile, respectively. The other tiles will have a tint of either the first or the second color depending on their size. In order to use the "gradient" algorithm, you need to set the range property to an array of only two values.
This algorithm is similar to "gradient", but the array assigned to the range property should contain more than two values. This array specifies the ranges between each value. The palette of two colors will generate multiple tints - one for each range.
If you use the "gradient" or "range" colorization algorithm, the color of the tile depends on the value. Normally, the value field supplies this value to the component. However, you can use the colorCodeField property to assign another field to supply the value.