[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

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
0
Motaz
Asked:
Motaz
  • 4
  • 2
1 Solution
 
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now