Database TeeChart

I want to set a TeeChart Series at run time for example I want to set below properties at run time:

DataSet: Table1
Label:
X:
Y:

Motaz
LVL 7
MotazAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MotazAuthor Commented:
I need this because I have many tables I opened at run time using single Table component, and I have a single TeeChart which I want to use with all these tables according to currently opened Table1
0
Wolfie320Commented:
Hi

Are you using a TDBChart?
If so, then try this...

Series1.DatsSource := Table1;
DBChart1.LeftAxis.Title.Caption := 'Y axis';
DBChart1.bottomAxis.Title.Caption := 'Y axis';

Wolfie
0
Wolfie320Commented:
Hi,

You must set some other properys too.

Try this...

procedure TForm1.InitButtonClick(Sender: TObject);
begin
  with Series1 do
  begin
    DataSource := Table1;
    XValues.ValueSource := 'Length';
    YValues.ValueSource := 'Age';
  end;
  DBChart1.LeftAxis.Title.Caption := 'Y axis';
  DBChart1.bottomAxis.Title.Caption := 'Y axis';
end;


I have test this and it works for me.

Wolfie
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

MotazAuthor Commented:
Wolfie, I test this code but the DBChart does not appear in my report:

  with fmChart do
  begin
    Series1.DataSource := Table1;
    Series1.XValues.ValueSource := 'Seiz';
    Series1.YValues.ValueSource := 'Seiz';
    DBChart1.LeftAxis.Title.Caption := 'Y axis';
    DBChart1.bottomAxis.Title.Caption := 'Y axis';
    QuickRep1.Preview;
  end;
0
MotazAuthor Commented:
Sorry, I use Quick Report Chart
0
MotazAuthor Commented:
Thanks it works.

Motaz
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.