Back to Devexpress

TdxChartStandardPaletteRepository.FindPalette(string) Method

vcl-dxchartpalette-dot-tdxchartstandardpaletterepository-dot-findpalette-x28-system-dot-string-x29.md

latest3.0 KB
Original Source

TdxChartStandardPaletteRepository.FindPalette(string) Method

Returns the standard palette with the specified name.

Declaration

delphi
class function FindPalette(const AName: string): TdxChartPalette;

Parameters

NameTypeDescription
ANamestring

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

|

Returns

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

|

Remarks

Call the FindPalette class function to obtain a predefined palette by its name in the global palette repository.

Predefined Palette List

You can pass one of the following names as the AName parameter to obtain the corresponding predefined palette:

A

  • Apex
  • Aspect

B

  • Black and White
  • Blue
  • Blue Green
  • Blue II
  • Blue Warm

C

  • Chameleon
  • Civic
  • Concourse

D

  • Default

E

  • Equity

F

  • Flow
  • Foundry

G

  • Grayscale
  • Green
  • Green Yellow

I

  • In A Fog

M

  • Marquee
  • Median
  • Metro
  • Mixed
  • Module

N

  • Nature Colors
  • Northern Lights

O

  • Office
  • Office 2013
  • Opulent
  • Orange
  • Orange Red
  • Oriel
  • Origin

P

  • Paper
  • Pastel Kit

R

  • Red
  • Red Orange
  • Red Violet

S

  • Slipstream
  • Solstice

T

  • Technic
  • Terracotta Pie
  • The Trees
  • Trek

U

  • Urban

V

  • Verve
  • Violet
  • Violet II

Y

  • Yellow
  • Yellow Orange

Code Example: Switch Between Predefined Palettes

The following code example applies the predefined palette Nature Colors to a Chart control:

delphi
dxChartControl1.Palette := TdxChartStandardPaletteRepository.FindPalette('Nature Colors');
cpp
dxChartControl1->Palette = TdxChartStandardPaletteRepository::FindPalette("Nature Colors");

See Also

TdxChartStandardPaletteRepository.Default Class Property

TdxChartStandardPaletteRepository Class

TdxChartStandardPaletteRepository Members

dxChartPalette Unit