aTYPE that summarises all 2D Series?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Jan
Newbie
Newbie
Posts: 24
Joined: Fri Nov 15, 2002 12:00 am
Location: Germany

aTYPE that summarises all 2D Series?

Post by Jan » Fri Aug 05, 2005 10:42 am

Hello to all!

My question is whether it is possible to generate a universal AddXY function programmatically. I have git a Chart on a Form that can contain several types of series. But now i want to have one function that is able to set a value to any of these Series. Something like that:

Function UniversalAddXY (FormID, SeriesID: INteger; X, Y : Double;LAbel :String) : Boolean
Begin
UniversalAddXY := FAlse;

If MyRoutines.ExistsGraphicForm (FormID) THen
Begin
MyRoutines.GetFormHandle (aGraphicForm, FormID
If (aGraphicForm.Chart1.SeriesCount-1 < SeriesID) And (SeriesID >=0) THen
Begin
If aGraphicForm.Chart1 [SeriesID] is ASUMMARIZEDSERIESCONTAININGAddXY_Function THen
Begin
(aGraphicForm.Chart1[SeriesID] as ASUMMARIZEDSERIESCONTAININGAddXY_Function).AddXY (X, Y, Label);
UniversalXY := True;
end;
end;
end;
end;

Just as an example to show what i mean. Is there anything like ASUMMARIZEDSERIESCONTAININGAddXY_Function? Because i would like to several create some of these functions as an interface between other parts of my project to keep it a little more comfortable maintaining. The idea is that it is possible to allow the user to add selected data to an already existing series independent from the type..
The same would be necessary for AddXYZ...

I hope it was clear to show what i mean. Any idea how to do that simple?

Jan

Post Reply