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
#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
- DefaultPalette
- DXPalette
- GreenPalette
- OfficePalette
- PaperPalette
- YellowPalette
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>