Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

#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