Skip to main content

TreeMapRangeColorizer Class

A colorizer that allows you to provide colors based on which range the TreeMapItem.Value belongs to.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v24.2.dll

Declaration

public class TreeMapRangeColorizer :
    TreeMapPaletteColorizerBase

Remarks

This class introduces the TreeMapRangeColorizer.RangeStops property that allows specifying range stops used to determine to which range a value belongs, and the TreeMapRangeColorizer.GroupColor allowing you to configure the color used to color groups.

For more information about colorizers, refer to the Colorizers topic.

Example

To color tree map items using the Range Colorizer, assign a newly created TreeMapRangeColorizer object to the TreeMapControl.Colorizer property. Then, specify the required palette using the TreeMapPaletteColorizerBase.Palette property. Finally, add the required range stops to the TreeMapRangeColorizer.RangeStops property.

void CreateTreeMapColorizer() {
    TreeMapRangeColorizer colorizer = new TreeMapRangeColorizer();
    colorizer.Palette = Palette.CreatePalette( 
        Color.FromArgb(110, 201, 90),
        Color.FromArgb(227, 227, 51),
        Color.FromArgb(255, 93, 23)
    );
    colorizer.RangeStops.Add(1);
    colorizer.RangeStops.Add(64);
    colorizer.RangeStops.Add(256);
    colorizer.RangeStops.Add(1024);

    treeMap.Colorizer = colorizer;
}

Implements

See Also