Skip to main content
All docs
V23.2

Palette.ScaleMode Property

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.v23.2.dll

NuGet Package: DevExpress.TreeMap

Declaration

[XtraSerializableProperty]
public PaletteScaleMode ScaleMode { get; set; }

Property Value

Type Description
PaletteScaleMode

The mode that defines the method of color distribution.

Available values:

Name Description Image
Repeat

Palette colors are repeated for the last chart items.

Palette scale mode - Repeat

Extrapolate

Colors for the last chart items are created based on palette colors by changing their brightness.

Palette scale mode - Extrapolate

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