wind rose

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Jürgen
Newbie
Newbie
Posts: 2
Joined: Tue Nov 25, 2003 5:00 am
Location: Germany
Contact:

wind rose

Post by Jürgen » Mon Dec 13, 2004 6:54 am

Thank you for the nice and useful TWindRoseSeries!
But how can I change the text of the CircleLabels of this series ?
The labels NEE, SEE, SWW and NWW should be displayed correctly as ENE, ESE, WSW and WNW, and for my German applications I want to translate E (east) to O (Ost).
Thank you for your efforts.
Jürgen

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Dec 13, 2004 7:19 am

Hi.

The easiest solution is to derive new series type from existing windrose series and override it's OnGetCircleLabel method. The following code should work fine:

Code: Select all

type TGermanWindRose = class(TWindRoseSeries)
  protected
    Function GetCircleLabel(Const Angle:Double; Index:Integer):String; override;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

{ GermanWindRose }
function TGermanWindRose.GetCircleLabel(const Angle: Double;
  Index: Integer): String;
var tmp : Double;
begin
  if MirrorLabels then tmp:=360-Angle
                   else tmp:=Angle;

  Case Round(tmp) of
      0: result:='N';
     15: result:='NNNW';
     30: result:='NNW';
     45: result:='NW';
     60: result:='NWW';
     75: result:='NWWW';
     90: result:='W';
    105: result:='SWWW';
    120: result:='SWW';
    135: result:='SW';
    150: result:='SSW';
    165: result:='SSSW';
    180: result:='S';
    195: result:='SSSO';
    210: result:='SSO';
    225: result:='SO';
    240: result:='SOO';
    255: result:='SOOO';
    270: result:='O';
    285: result:='NOOO';
    300: result:='NOO';
    315: result:='NO';
    330: result:='NNO';
    345: result:='NNNO';
    360: result:='N';
  else result:='';
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.AddSeries(TGermanWindRose);
  Chart1.Series[0].FillSampleValues(10);
end;
Marjan Slatinek,
http://www.steema.com

Jürgen
Newbie
Newbie
Posts: 2
Joined: Tue Nov 25, 2003 5:00 am
Location: Germany
Contact:

wind rose

Post by Jürgen » Mon Dec 13, 2004 8:30 am

Thank you, it works fine, but what is 'MirrorLabels' ? Is it a new property of TWindRose? (I'm using TeeChart Pro 6)
Jürgen

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Dec 14, 2004 7:10 am

Hi,

yes, it's a new property for the v7. When True, the wind-rose labels will be mirrored, using the following formula:
angle := 360 - angle

Janusz_Cichocki
Newbie
Newbie
Posts: 27
Joined: Thu Nov 29, 2007 12:00 am

TWindRose, FontSize

Post by Janusz_Cichocki » Thu Jul 03, 2008 7:31 pm

Hi,
I have some questions about TWindRose

1. Can I change fontsize of main angels (N, S, E, W) ?
{If N, S, E, W size = 20 else size = 15}
2. I think it would be good to add "extra" arrow to each main angel
It is the graphic way we show wind rose very often
Janusz

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

Post by Narcís » Fri Jul 04, 2008 8:52 am

Hi Janusz,

I'm afraid this is not possible at the moment. I've added your rquest to our wish-list to be considered for inclusion in future releases.

BTW: Could you please give us some more details on how would you expect the "extra arrow" to be? If you want you can send us an example image at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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

Janusz_Cichocki
Newbie
Newbie
Posts: 27
Joined: Thu Nov 29, 2007 12:00 am

wind rose

Post by Janusz_Cichocki » Fri Jul 04, 2008 12:15 pm

hi,
J have just sent rw_arrow.jpg file with example of "extra arrows"
Janusz

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

Post by Narcís » Fri Jul 04, 2008 2:09 pm

Hi Janusz,

Thanks for the image. I've upgraded the info. at the wish-list.
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