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
wind rose
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:
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
http://www.steema.com
wind rose
Thank you, it works fine, but what is 'MirrorLabels' ? Is it a new property of TWindRose? (I'm using TeeChart Pro 6)
Jürgen
Jürgen
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
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
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 27
- Joined: Thu Nov 29, 2007 12:00 am
TWindRose, FontSize
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
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
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 27
- Joined: Thu Nov 29, 2007 12:00 am
wind rose
hi,
J have just sent rw_arrow.jpg file with example of "extra arrows"
Janusz
J have just sent rw_arrow.jpg file with example of "extra arrows"
Janusz
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Janusz,
Thanks for the image. I've upgraded the info. at the wish-list.
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 |
Instructions - How to post in this forum |