ChartControl.GetPaletteEntries(Int32) Method

Gets the colors that comprise the palette.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.UI.dll

Declaration

public PaletteEntry[] GetPaletteEntries(
    int count
)
Public Function GetPaletteEntries(
    count As Integer
) As PaletteEntry()

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;

GetPaletteEntities_count_1_baseColor_1_repeatMode

GetPaletteEntities_count_2_baseColor_1_repeatMode

GetPaletteEntities_count_6_baseColor_1_repeatMode

PaletteBaseColorNumber = 0;

GetPaletteEntities_count_1_baseColor_0

GetPaletteEntities_count_2_baseColor_0

GetPaletteEntities_count_6_baseColor_0

PaletteBaseColorNumber = 1;

GetPaletteEntities_count_1_baseColor_1

GetPaletteEntities_count_2_baseColor_1

GetPaletteEntities_count_6_baseColor_1

See Also