creating copy function in code

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

creating copy function in code

Post by seanmurphy » Mon Oct 31, 2005 1:50 pm

I want to copy the data from series1 to series2 in code, and thought I could do this with copy function, but can't seem to get the syntax.

I was expecting something like this, but Tcopyteefunction does not seem to work

with series1 do
begin
DataSource:=series2;
SetFunction(TCopyTeeFunction.Create(self));
CheckDatasource;
end;

thanks
Sean

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Nov 02, 2005 9:33 am

Hi Sean,

It's much easier, you don't need to define any function, just set a series as a datasource for the other:

Code: Select all

  With Series1.DataSources do
  begin
    Clear;
    Add( Series2 );
  end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

Post by seanmurphy » Wed Nov 02, 2005 11:39 am

thanks Narcis, that was just the job.
Sean

Post Reply