TeeChart and system Styles / Themes. (VCL and Firemonkey)

Next coming TeeChart update will include a new small “Theme” class to use the color settings from the current Application style (VCL and Firemonkey).

(Application styles are available in RAD Studio XE3 and up).

TeeChart_VCL_Style_Light    TeeChart_VCL_Style_Metropolis_Green    TeeChart_VCL_Style_Ruby_Graphite   TeeChart_FMX_Style_Mac_Diamond

The code to enable this automatic chart styling is:

VCL:

uses VCLTee.TeeThemes;
TSystemTheme.ApplyStyle( Chart1 );

Firemonkey:

uses FMXTee.TeeThemes;
TSystemTheme.ApplyStyle( Chart1 );

 

Download:  (Not ready yet until update release)

Small VCL and FMX demos showing how to change the application style at runtime, and then using TeeChart TSystemTheme to apply the current style to a chart.   (For RAD Studio XE3 and up)

 

Notes:

The chart Series ColorPalette is left untouched when applying a system style. It can always be changed using the Chart1.ColorPaletteIndex property or TColorPalettes class methods.

For VCL styles, Font properties (Name, Font Style and Font Size) aren’t applied as there is no easy way to obtain them.  Hope this will be implemented in future updates.

The Chart background and Walls.Back Gradient is disabled when applying a system style, to enable the background color.

 

For more information about RAD XE / Delphi styles:

VCL: Rodrigo Ruz “The Road to Delphi”

Firemonkey: FMX Express Styles