Hallo ihr,
ich hab mal meine Delphi-Hilfe konsultiert, und folgendes gefunden:
Zitat:
TeeChart Charts will connect with 3 different types of Dataset.
TTable
TQuery
TClientDataset
The minimum that requires to be set in each case is:
The name of the database,
For the table the TableName of a table
or
in the case of the
query a valid
SQL string.
or
in the case of a ClientDataset Define source (right button on TClientDataset object in form).
Remember to activate the Dataset by setting the Active property to True.
...
You may populate your Chart at runtime by coding which Series to add to the Chart and defining the fields of those Series.
It assumes you have a table on your form, Table1 with fields Name and Amount.
Delphi-Quellcode:
Var
MySeries,Ave:TLineSeries;
MySeries:=TLineSeries.Create( Self );
With MySeries do
begin
ParentChart:=DBChart1;
DataSource:=Table1;
XLabelsSource:='Name';
YValues.ValueSource:= 'Amount';
CheckDatasource;
end;
Verwendet hab ich das Ding nie, also kann ich nicht mehr als das sagen. Vielleicht hilft es euch aber trotzdem weiter
Greetz
alcaeus