ISeries.ColorSource
ISeries
property ColorSource: WideString;
Type Library
TeeChartx
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 TChart 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 TChart1.Series(0)
.YValues.ValueSource = "Value"
.LabelsSource = "Text2
.ColorSource = "Color"
.DataSource = Record
end
For each record, a point will be added to Series using the fields Color, Value and Text.