Wind name labels on Polar Bar Graph

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
MINAS
Newbie
Newbie
Posts: 4
Joined: Tue Sep 04, 2007 12:00 am

Wind name labels on Polar Bar Graph

Post by MINAS » Tue Oct 02, 2007 1:59 pm

Hi,

i have a polar bar graph and i want to change the circle labels from 0, 22.5, 45, 67.5 ... to N, NNE, NE, NEE, ...

How can i do this ?

Thanks,

Minas

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

Post by Narcís » Tue Oct 02, 2007 2:22 pm

Hi Minas,

Yes, you can achieve what you request using OnGetCircleLabel event as shown here:

Code: Select all

procedure TForm1.Series1GetCircleLabel(Sender: TCustomPolarSeries;
  const Angle: Double; Index: Integer; var Text: String);
begin
  if Angle = 0 then begin Text:='E'; exit; end;
  if Angle = 90 then begin Text:='N'; exit; end;
  if Angle = 180 then begin Text:='W'; exit; end;
  if Angle = 270 then begin Text:='S'; exit; end;

  Text:='';
end;
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