Hello,
since I always have the same problem connecting any information to a TChartAxis I want to suggest adding a published TAG or DATA (Integer) property to the TChartAxis Class.
With this tag I could add my own objects to the axis. A great help whenever you want to find the corresponding axis to connect grouped series.
Example how you could use this tag for detecting the correct axis to connect a series to:
If TMyObject(mychart.customaxes.tag).PhysUnit = Searchunit then
MyLineSeries.customvertaxis:=mychart.customaxes;
My be you could take this idea into account for the future?
thanks
Jo
Suggestion: TAG property to TChartAxis
Re: Suggestion: TAG property to TChartAxis
Hello Jo,
I've added it to the wish list to be investigated for inclusion in future releases (TV52015673).
In the meanwhile, I think you shouldn't find too much problems on inheriting from TChartAxis and add the "Tag" property yourself. For example:
I've added it to the wish list to be investigated for inclusion in future releases (TV52015673).
In the meanwhile, I think you shouldn't find too much problems on inheriting from TChartAxis and add the "Tag" property yourself. For example:
Code: Select all
uses Series;
type MyAxis=class(TChartAxis)
private
Tag: Integer;
public
Constructor Create(Collection:TCollection); override;
end;
{ MyAxis }
constructor MyAxis.Create(Collection: TCollection);
begin
inherited;
Tag:=-1;
end;
procedure TForm1.FormCreate(Sender: TObject);
var axis1: MyAxis;
begin
Chart1.MarginLeft:=10;
Chart1.View3D:=false;
Chart1.AddSeries(TFastLineSeries).FillSampleValues();
axis1:=MyAxis.Create(Chart1);
Chart1[0].CustomVertAxis:=axis1;
axis1.Tag:=5;
axis1.Title.Caption:='my custom axis with tag=' + IntToStr(axis1.Tag);
axis1.Title.Angle:=90;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Suggestion: TAG property to TChartAxis
Right. That's the way I did it in the past. Thank you!
Jays
Jays