BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TeeChart: Dynamic Series in DBChart

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting
View previous topic :: View next topic  
Author Message
JZ
Guest





PostPosted: Thu Feb 17, 2005 3:05 pm    Post subject: TeeChart: Dynamic Series in DBChart Reply with 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
Narcís Calvet
Guest





PostPosted: Thu Feb 17, 2005 3:36 pm    Post subject: Re: TeeChart: Dynamic Series in DBChart Reply with 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

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





PostPosted: Thu Feb 17, 2005 4:01 pm    Post subject: Re: TeeChart: Dynamic Series in DBChart Reply with quote



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





PostPosted: Thu Feb 17, 2005 11:44 pm    Post subject: Re: TeeChart: Dynamic Series in DBChart Reply with quote

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





PostPosted: Fri Feb 18, 2005 1:05 pm    Post subject: Re: TeeChart: Dynamic Series in DBChart Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.