How to detect is an axis is used by a series?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
moelski
Newbie
Newbie
Posts: 92
Joined: Tue Jun 19, 2007 12:00 am
Contact:

How to detect is an axis is used by a series?

Post by moelski » Wed Dec 10, 2008 6:33 am

Hi !

Is there any easy way to detect if an axis is used by one (or more) series? Something like ....

Code: Select all

If Chart.CustomAxes[Nr].Used = True then .....
Greetz Doinik

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Dec 10, 2008 9:20 am

Hi Dominik,

The only solution I can think of is doing something like this:

Code: Select all

  for i:=0 to Chart1.CustomAxes.Count - 1 do
  begin
    for j:=0 to Chart1.SeriesCount - 1 do
    begin
      if ((Chart1[j].CustomHorizAxis = Chart1.CustomAxes[i]) or
          (Chart1[j].CustomVertAxis = Chart1.CustomAxes[i])) then
      begin
        //Add your code here
      end;
    end;
  end;
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply