Page 1 of 1

Wind name labels on Polar Bar Graph

Posted: Tue Oct 02, 2007 1:59 pm
by 10046619
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

Posted: Tue Oct 02, 2007 2:22 pm
by narcis
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;