TChartSeries.ColorSource

TChartSeries.ColorSource
TChartSeries

property ColorSource: String;

Unit
TeEngine

Description
This property is only used when connecting a Series to a database dataset or datasource.

The ColorSource property must be a valid numeric Data Field Name.

When loading the dataset records, a TDBChart component assigns every point's color to the ColorSource field value.

Color Values in Table or Query
fields must be expressed as RGB values (integer).

Example:

Supose you have a table with the following fields: Color, Value, Text

Then you link the Series to this table:

with Series1 do
begin
YValues.ValueSource := 'Value';
XLabelsSource := 'Text';
ColorSource:='Color';
DataSource := Table1;
end;

For each record in Table1, a point will be added to Series1 using the fields Color, Value and Text.