TreeMapRangeColorizer Class
A colorizer that allows you to provide colors based on which range the ITreeMapItem.Value belongs to.
Namespace: DevExpress.XtraTreeMap
Assembly: DevExpress.XtraTreeMap.v18.1.dll
Declaration
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-color-treemap-items-using-range-colorizer-t361287
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;
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TreeMapRangeColorizer class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.