Palette.ScaleMode Property
In This Article
Specifies how to distribute colors when their number in the palette is less than the number of chart items.
Namespace: DevExpress.XtraTreeMap
Assembly: DevExpress.XtraTreeMap.v24.2.dll
#Declaration
[XtraSerializableProperty]
public PaletteScaleMode ScaleMode { get; set; }
#Property Value
Type | Description |
---|---|
Palette |
The mode that defines the method of color distribution. |
Available values:
Name | Description | Image |
---|---|---|
Repeat | Palette colors are repeated for the last chart items. |
|
Extrapolate | Colors for the last chart items are created based on palette colors by changing their brightness. |
#Remarks
The following code shows how to configure a treemap colorizer that uses a newly created palette, and specify the palette scale mode:
using DevExpress.XtraTreeMap;
using System.Drawing;
//...
Palette palette = new Palette();
palette.AddRange(new Color[] {
Color.FromArgb(255, 153, 203, 56),
Color.FromArgb(255, 99, 165, 55),
Color.FromArgb(255, 55, 167, 111),
Color.FromArgb(255, 68, 193, 163),
Color.FromArgb(255, 78, 179, 207),
Color.FromArgb(255, 81, 195, 249),
});
palette.ScaleMode = PaletteScaleMode.Repeat;
TreeMapPaletteColorizer colorizer = new TreeMapPaletteColorizer() { Palette = palette, ColorizeGroups = true };
treeMapControl1.Colorizer = colorizer;
See Also