Skip to main content

ChartControlBase.Palette Property

Gets or sets the palette which is used to draw the chart’s series.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.1.dll

NuGet Package: DevExpress.Wpf.Charts

Declaration

public Palette Palette { get; set; }

Property Value

Type Description
Palette

A Palette class descendant object that represents the palette with colors.

Remarks

The Palette property defines colors for series points. It can be set either to one of the standard palettes, or to a CustomPalette object. A custom palette’s colors are stored in the ColorCollection, which is available using the CustomPalette.Colors property.

The name of the currently selected palette can be accessed using the DXChartsPalette.PaletteName property. If some of the default palette colors were manually changed, you can obtain the currently used set of colors using the ChartControlBase.Palette property.

For more information, refer to Chart Themes and Palettes.

Example

This example demonstrates how to change the series point colors by using a custom palette. To do this, a CustomPalette is added to the chart’s ChartControlBase.Palette. And, custom colors are specified via the CustomPalette.Colors property.

View Example

<dxc:ChartControl.Palette>
    <dxc:CustomPalette>
        <dxc:CustomPalette.Colors>
            <Color>Blue</Color>
            <Color>Yellow</Color>
            <Color>Magenta</Color>
        </dxc:CustomPalette.Colors>
    </dxc:CustomPalette>
</dxc:ChartControl.Palette>

The following code snippets (auto-collected from DevExpress Examples) contain references to the Palette property.

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.

See Also