TChartValueList.ValueSource
 
 
 

All Units  All Classes  Properties, Methods and Events  

TChartValueList.ValueSource
TChartValueList

property ValueSource: String;

Unit
TeEngine

Description
Each Chart Value List has a ValueSource property. You can set this string property to different kind of values:

Case 1. A Chart Series is connected to a database source:

If the Series that owns this ValueList is attached to a TDBChart, and the Series.DataSource property is a TTable, TQuery, TClientDataset or any TDataSet component which provides database records, then the ValueSource property must refer to an existing numeric, date, time or datetime Field Name in the underlying dataset.

Example:

LineSeries1.DataSource := Table1 ;
LineSeries1.YValues.ValueSource := 'Quantity' ;

Being Quantity, a former numeric Field Name in Table1.

Case 2. A Chart Series is connected to another Chart Series:

If the Series which owns this ValueList is attached to a TChart (or a TDBChart), and if the Series.DataSource property is any TChartSeries component, then the ValueSource property must refer to an existing TChartValueList Name in the underlying TChartSeries.

Example:

LineSeries1.DataSource:=BubbleSerie2;
LineSeries1.YValues.ValueSource:='Y';

Being Y, the BubbleSeries2.YValues.Name.

ASSUMPTIONS:

Changing the ValueSource property both at design or runtime, will force the Series to fill again its values from the specified DataSource.

This must be specially considered when the DataSource Series property is a database TTable or TQuery or TClientDataset, because maybe it takes a long time to retrieve all records.

If the dataset is closed, the automatic record retrieving will be performed later on, when the dataset is opened again.



Send us Help Feedback. Copyright 1995-2013 © by Steema Software. All Rights Reserved.