I would like to dynamically create a serie to connect to a dataset :
query = select myfield,count(myfield) from XXX group by 1
The code is very simple :
Code: Select all
procedure TForm26.Button1Click(Sender: TObject);
begin
DBChart1.AddSeries(TPieSeries);
DBChart1.Series[0].DataSource := Q_TABLEFX;
DBChart1.Series[0].YValues.ValueSource := 'SERIE1';
DBChart1.Series[0].XLabelsSource := 'GROUPE1';
end;
But in my 7 millions of line of code program with the same code my
TDBChart
display a Single record like this :and result : But I want = If I edit (in runtime) my
TDBChart
to connect to a dataset it's work :
I have tried uses order without change.
Why my
TDBChart
display it datasource as "Single record" and not as a (multi-record) dataset ?In other words of to force a dataset or a single record dataset ?
PS : I use Teechart Pro 2023.38.230607 VCL with Delphi 11.3