Hi, i would like to know if there is a pointer property i could used to store custom information about a TChartSeries. It would be more easier for me to managed all the custom series information directly from the serie than my custom list that i have to access from a lot of forms etc... Im my project, the TChart is commun to my forms and it would be faster for me to access the ASeries.DATA (Pointer) or ASeries.Object (TObject).
Thanks a lot
DATA or OBJECT
Re: DATA or OBJECT
Hi GoToXY,
You could create a new series type that inherits from one of the series types and add as many properties as you want to it. For example:
You could create a new series type that inherits from one of the series types and add as many properties as you want to it. For example:
Code: Select all
TMyCustomBarSeries=class(TBarSeries)
private
MyNewProperty: Integer;
end;
//...
procedure TForm1.FormCreate(Sender: TObject);
begin
with Chart1.AddSeries(TMyCustomBarSeries) as TMyCustomBarSeries do
begin
FillSampleValues();
MyNewProperty:=5;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: DATA or OBJECT
I did modified your code by adding a DATA property of a pointer to the TChartSeries class. That way, i dont have to create all the existing kind of chart that there is in TeeChart. I already have over 1M lines of code and i dont have time to change all the types. And i still think you should add it too.
I'm sure im not the only who will need that DATA property. And doing so will be dynamic to all other software we can build after. Its like a TStringList, u can use the AddObject to link a list to an object/pointer. well, in my case, The TChart SeriesList is my main list. have a litle extra property as DATA will allow me to link anykind of object to it. So i wont have to make extra classes to fill my need for each software i would need something like that. The TTreeNode use DATA too and i really dont want to imagine creating new sub class from a TTreeNode to have custom properties.
thanks
I'm sure im not the only who will need that DATA property. And doing so will be dynamic to all other software we can build after. Its like a TStringList, u can use the AddObject to link a list to an object/pointer. well, in my case, The TChart SeriesList is my main list. have a litle extra property as DATA will allow me to link anykind of object to it. So i wont have to make extra classes to fill my need for each software i would need something like that. The TTreeNode use DATA too and i really dont want to imagine creating new sub class from a TTreeNode to have custom properties.
thanks
Re: DATA or OBJECT
And by the time, if i inherite my class from an other class an you guys decide to add a new property with the same name as mine, i will have to modify my code to suit yours. That wont happend if i get my DATA property.
Re: DATA or OBJECT
Hi GoToXY,
I've added your request to the wish list to be implemented in future releases (TV52015136)
I've added your request to the wish list to be implemented in future releases (TV52015136)
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: DATA or OBJECT
thanks a lot, i really appreciate it