ChartControl.GetPaletteEntries(Int32) Method
Gets the colors that comprise the palette.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.1.UI.dll
NuGet Package: DevExpress.Win.Charts
Declaration
Parameters
Name | Type | Description |
---|---|---|
count | Int32 | An integer value, representing the number of entries to return. |
Returns
Type | Description |
---|---|
PaletteEntry[] | An array of PaletteEntry objects. |
Remarks
This method can be used to get palette entities that are used to color a series or series point.
Note
- If the ChartControl.PaletteBaseColorNumber property is specified, then the resulting array will contain only colors based on the specified base color.
- If the count of required colors is larger than the palette color count, than several of the returned colors will be shaded when compared to the palette colors, and several of the returned colors will be lighter than the palette colors. The lighted and shaded color count is based on the palette color count. Note that if palette is created with DevExpress.XtraCharts.PaletteScaleMode.Repeat mode, than the colors will not be shaded or lightened.
For example, a palette containing the two following colors are used.
- orange (R = 255, G = 128, B = 0).
- gray (R = 192, G = 192, B = 192).
The following table demonstrates the results of color generation with several values of PaletteBaseColorNumber property and count method parameter.
count = 1 | count = 2 | count = 6 | |
---|---|---|---|
PaletteBaseColorNumber = 0; Mode = PaletteScaleMode.Repeat; | |||
PaletteBaseColorNumber = 0; | |||
PaletteBaseColorNumber = 1; |