Page 1 of 1

creating copy function in code

Posted: Mon Oct 31, 2005 1:50 pm
by 9231397
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

Posted: Wed Nov 02, 2005 9:33 am
by narcis
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;

Posted: Wed Nov 02, 2005 11:39 am
by 9231397
thanks Narcis, that was just the job.
Sean