Polar plot labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
dpatch
Newbie
Newbie
Posts: 53
Joined: Mon Jul 02, 2007 12:00 am

Polar plot labels

Post by dpatch » Fri Mar 26, 2010 4:15 am

Hello,

I am usint a TPolarSeries and am trying to draw the axis labels from +180 to -180 (or 0) with the 0 at 12 o'clock position, +90 at the 3 o'clock position, 180 at the 6 o'clock position and -90 at the 9 o'clock position. I have set CircleLabels := True, called Rotate(90), and am using the OnGetCircleLabel event. The event code looks like this:

if angle > 180 then
Text:=FloatToStr(Angle-360) + 'º'
else
Text:=FloatToStr(Angle) + 'º'

This properly converts the labels from 0-360 to +/-180. This makes the labels do what I want, but in the opposite direction...meaning -90 is at 3 0'clock and +90 is at 9 o'clock. 0 and 180 are in the correct positions.

How can I get the labels to draw in a clockwise direction instead of a counter clowise direction?

Thanks in advance.

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Polar plot labels

Post by Yeray » Fri Mar 26, 2010 3:49 pm

Hi dpatch,

If I understood well, what about this?

Code: Select all

  if angle >= 180 then
    Text:=FloatToStr(Abs(Angle-360)) + 'º'
  else
    Text:='-'+FloatToStr(Angle) + 'º';
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply