Skip to main content
All docs
V24.1

TdxChartPalette Class

A standard Chart palette.

Declaration

TdxChartPalette = class(
    TObject
)

Remarks

A standard (or predefined) palette stores a set of colors you can apply to series and series points in a Chart control.

VCL Chart Control: Predefined Palette Examples

All standard palettes are stored at the global level, and you can access them through TdxChartStandardPaletteRepository class members.

Note

You cannot manage the list of standard palettes or customize them. However, you can use add a TdxChartPaletteRepository component to create and manage custom palettes.

Main API Members

The list below outlines key members of the TdxChartPalette class. These members allow you to work with predefined palette colors.

Palette Item Access and Management APIs

While a palette can store only a limited number of colors, you can also generate interpolated palette items based on stored colors.

Count

Returns the number of items in the predefined palette.

You can use this property to change the number of stored palette items.

GetColorsForIndex

Returns a stored or extrapolated palette item by the specified index.

If the specified index exceeds the maximum stored item index (Count - 1), the function returns a palette item with extrapolated colors based on stored colors according to the predefined algorithm.

Note

As the specified index increases, the difference between two adjacent interpolated colors becomes less distinguishable.

Items
Provides indexed access to stored standard palette items.

Palette Save Methods

You can export standard palette colors to a file or stream in an internal XML-like format.

SaveToFile | SaveToStream
Save all palette items to a file or stream.

General-Purpose API Members

Name
Returns the standard palette’s name.

Direct TdxChartPalette Class References

The following public API members reference a TdxChartPalette object:

TdxChartPaletteRepository.FindPalette
Returns the stored user or standard palette with the specified name.
TdxChartStandardPaletteRepository.Default
Provides access to the default chart palette.
TdxChartStandardPaletteRepository.FindPalette
Returns the standard palette with the specified name.
TdxChartStandardPaletteRepository.GetAll
Returns all predefined chart palettes.

Terminal TdxChartPalette Class Descendant

The TdxChartPalette class is the direct ancestor of the TdxChartUserPalette class that implements custom palettes stored in a TdxChartPaletteRepository component.

Inheritance

TObject
TdxChartPalette
See Also