vcl-dxchartpalette-dot-tdxchartstandardpaletterepository-dot-findpalette-x28-system-dot-string-x29.md
Returns the standard palette with the specified name.
class function FindPalette(const AName: string): TdxChartPalette;
| Name | Type | Description |
|---|---|---|
| AName | string |
The target standard palette name.
The function iterates through standard palettes and returns the palette whose name matches the parameter value.
If the repository contains no palette with the required name, the function returns nil (in Delphi) or nullptr (in C++Builder).
|
| Type | Description |
|---|---|
| TdxChartPalette |
The stored standard palette whose name matches the AName parameter value.
The function returns nil (in Delphi) or nullptr (in C++Builder) if the repository contains no palette with the specified name.
|
Call the FindPalette class function to obtain a predefined palette by its name in the global palette repository.
You can pass one of the following names as the AName parameter to obtain the corresponding predefined palette:
The following code example applies the predefined palette Nature Colors to a Chart control:
dxChartControl1.Palette := TdxChartStandardPaletteRepository.FindPalette('Nature Colors');
dxChartControl1->Palette = TdxChartStandardPaletteRepository::FindPalette("Nature Colors");
See Also
TdxChartStandardPaletteRepository.Default Class Property
TdxChartStandardPaletteRepository Class