 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
JZ Guest
|
Posted: Thu Feb 17, 2005 3:05 pm Post subject: TeeChart: Dynamic Series in DBChart |
|
|
I have a DBChart for which I need to assign fields to a scatter series
dynamically. I assign the database (a TClientDataBase) to the Chart through
the interface. Then assign the fields to the X and Y values. However,
nothing happens. The chart does not update or anything.
Here is the code I am trying. The field name is from a combobox
(cbContOutputs.text) and I have checked through a dbgrid, there is data
there.
ApplyResults.active := true;
applyResults.open;
Series1.YValues.ValueSource := cbContOutputs.Text;
Series1.XValues.ValueSource := 'Pred_'+cbContOutputs.Text;
ApplyResults.Close;
Any help would be appreciated.
|
|
| Back to top |
|
 |
Narcís Calvet Guest
|
Posted: Thu Feb 17, 2005 3:36 pm Post subject: Re: TeeChart: Dynamic Series in DBChart |
|
|
Hi JZ,
Have you tried using Series1.CheckDataSource after populating the series?
--
Best Regards,
Narcís Calvet
http://support.steema.com
"Important note: If you are a TeeChart registered customer, please post your
support questions at Steema's Support monitored Forums for customers:
http://support.steema.com for a prompter reply."
"JZ" <ddd> wrote
| Quote: | I have a DBChart for which I need to assign fields to a scatter series
dynamically. I assign the database (a TClientDataBase) to the Chart
through
the interface. Then assign the fields to the X and Y values. However,
nothing happens. The chart does not update or anything.
Here is the code I am trying. The field name is from a combobox
(cbContOutputs.text) and I have checked through a dbgrid, there is data
there.
ApplyResults.active := true;
applyResults.open;
Series1.YValues.ValueSource := cbContOutputs.Text;
Series1.XValues.ValueSource := 'Pred_'+cbContOutputs.Text;
ApplyResults.Close;
Any help would be appreciated.
|
|
|
| Back to top |
|
 |
JZ Guest
|
Posted: Thu Feb 17, 2005 4:01 pm Post subject: Re: TeeChart: Dynamic Series in DBChart |
|
|
Seems reasonable. Help indicates it is the correct thing to do.
I tried:
DBChart.CheckDataSource(Series1);
and
Series1.checkdatasource;
Both do nothing!!!
"Narcís Calvet" <support (AT) steema (DOT) com> wrote
| Quote: | Hi JZ,
Have you tried using Series1.CheckDataSource after populating the series?
--
Best Regards,
Narcís Calvet
http://support.steema.com
"Important note: If you are a TeeChart registered customer, please post
your
support questions at Steema's Support monitored Forums for customers:
http://support.steema.com for a prompter reply."
"JZ" <ddd> wrote
I have a DBChart for which I need to assign fields to a scatter series
dynamically. I assign the database (a TClientDataBase) to the Chart
through
the interface. Then assign the fields to the X and Y values. However,
nothing happens. The chart does not update or anything.
Here is the code I am trying. The field name is from a combobox
(cbContOutputs.text) and I have checked through a dbgrid, there is data
there.
ApplyResults.active := true;
applyResults.open;
Series1.YValues.ValueSource := cbContOutputs.Text;
Series1.XValues.ValueSource := 'Pred_'+cbContOutputs.Text;
ApplyResults.Close;
Any help would be appreciated.
|
|
|
| Back to top |
|
 |
David Berneda Guest
|
Posted: Thu Feb 17, 2005 11:44 pm Post subject: Re: TeeChart: Dynamic Series in DBChart |
|
|
Is ApplyResults a dataset / database ?
Do you set Series1.DataSource := ApplyResults ?
Calling ApplyResults.Close will clear the Series so they will look empty, try to comment this.
regards
david
www.teechart.com
"JZ" <ddd> wrote
| Quote: | I have a DBChart for which I need to assign fields to a scatter series
dynamically. I assign the database (a TClientDataBase) to the Chart through
the interface. Then assign the fields to the X and Y values. However,
nothing happens. The chart does not update or anything.
Here is the code I am trying. The field name is from a combobox
(cbContOutputs.text) and I have checked through a dbgrid, there is data
there.
ApplyResults.active := true;
applyResults.open;
Series1.YValues.ValueSource := cbContOutputs.Text;
Series1.XValues.ValueSource := 'Pred_'+cbContOutputs.Text;
ApplyResults.Close;
Any help would be appreciated.
|
|
|
| Back to top |
|
 |
JZ Guest
|
Posted: Fri Feb 18, 2005 1:05 pm Post subject: Re: TeeChart: Dynamic Series in DBChart |
|
|
Yes! That did it.
However, isn't it bad form to leave the database open like that? Is there a
way to eventually close it?
Thanks,
"David Berneda" <david2 (AT) steema (DOT) com> wrote
Is ApplyResults a dataset / database ?
Do you set Series1.DataSource := ApplyResults ?
Calling ApplyResults.Close will clear the Series so they will look empty,
try to comment this.
regards
david
www.teechart.com
"JZ" <ddd> wrote
| Quote: | I have a DBChart for which I need to assign fields to a scatter series
dynamically. I assign the database (a TClientDataBase) to the Chart
through
the interface. Then assign the fields to the X and Y values. However,
nothing happens. The chart does not update or anything.
Here is the code I am trying. The field name is from a combobox
(cbContOutputs.text) and I have checked through a dbgrid, there is data
there.
ApplyResults.active := true;
applyResults.open;
Series1.YValues.ValueSource := cbContOutputs.Text;
Series1.XValues.ValueSource := 'Pred_'+cbContOutputs.Text;
ApplyResults.Close;
Any help would be appreciated.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|