Back to Devexpress

TdxChartPalette Class

vcl-dxchartpalette-97c426d5.md

latest4.3 KB
Original Source

TdxChartPalette Class

A standard Chart palette.

Declaration

delphi
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.

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.

ItemsProvides 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 | SaveToStreamSave all palette items to a file or stream.

General-Purpose API Members

NameReturns the standard palette’s name.

Direct TdxChartPalette Class References

The following public API members reference a TdxChartPalette object:

TdxChartPaletteRepository.FindPaletteReturns the stored user or standard palette with the specified name.TdxChartStandardPaletteRepository.DefaultProvides access to the default chart palette.TdxChartStandardPaletteRepository.FindPaletteReturns the standard palette with the specified name.TdxChartStandardPaletteRepository.GetAllReturns 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

TdxChartUserPalette Class

TdxChartStandardPaletteRepository Class

TdxChartPalette Members

dxChartPalette Unit