aTYPE that summarises all 2D Series?
Posted: 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
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