Skip to main content

ChartBase.Palette Property

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

Namespace: DevExpress.WinUI.Charts

Assembly: DevExpress.WinUI.Charts.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

[DP(null, Handler = "PalettePropertyChanged")]
public Palette Palette { get; set; }

Property Value

Type Description
Palette

A Palette object that is the palette with colors.

Remarks

The Palette property defines colors for series. Use the Palette.PaletteName property to obtain the currently selected palette’s name.

You can assign one of predefined palettes to the Palette property. The following code sample applies the Blue Palette to a pie chart:

<Charts:PieChart.Palette>
    <Charts:BluePalette/>
</Charts:PieChart.Palette>

The following list contains all the predefined palettes:

BluePalette
Blue palette colors
DefaultPalette
Default palette colors
DXPalette
DXpalette colors
GreenPalette
Green palette colors
OfficePalette
Office palette colors
PaperPalette
Paper palette colors
YellowPalette
Yellow palette colors

If the number of series points exceeds the number of palette colors, faded palette colors apply to the remaining points.

Create a Palette

You can also create a palette. To do this, assign a CustomPalette object to the Palette property. Then, populate the palette with Color objects:

<Charts:PieChart.Palette>    
    <Charts:CustomPalette>
        <Color>#E74C3C</Color>
        <Color>#8E44AD</Color>
        <Color>#F4D03F</Color>
        <Color>#3498DB</Color>
        <Color>#2ECC71</Color>
    </Charts:CustomPalette>    
</Charts:PieChart.Palette>
See Also