Skip to main content

How to: Color TreeMap Using the Group Gradient Colorizer

To color each tree map group using similar colors, use the TreeMapGroupGradientColorizer class. Assign an instance of the class to the TreeMapControl.Colorizer property. The TreeMapPaletteColorizerBase.Palette property specifies colors assigned to groups. The TreeMapGroupGradientColorizer.Max and TreeMapGroupGradientColorizer.Min properties configure the maximum and minimum portion of palette colors in colors assigned to items. The TreeMapGroupGradientColorizer.GradientColor property sets a color with which palette colors are mixed.

View Example

void ConfigureTreeMapColorizer() {
    treeMap.Colorizer = new TreeMapGroupGradientColorizer {
        GradientColor = Color.White,
        Max = 1,
        Min = 0.3,
        Palette = Palette.Office2013Palette,