Page 1 of 1
wind rose
Posted: Mon Dec 13, 2004 6:54 am
by 8441921
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
Posted: Mon Dec 13, 2004 7:19 am
by Marjan
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;
wind rose
Posted: Mon Dec 13, 2004 8:30 am
by 8441921
Thank you, it works fine, but what is 'MirrorLabels' ? Is it a new property of TWindRose? (I'm using TeeChart Pro 6)
Jürgen
Posted: Tue Dec 14, 2004 7:10 am
by Pep
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
TWindRose, FontSize
Posted: Thu Jul 03, 2008 7:31 pm
by 10547537
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
Posted: Fri Jul 04, 2008 8:52 am
by narcis
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.
wind rose
Posted: Fri Jul 04, 2008 12:15 pm
by 10547537
hi,
J have just sent rw_arrow.jpg file with example of "extra arrows"
Janusz
Posted: Fri Jul 04, 2008 2:09 pm
by narcis
Hi Janusz,
Thanks for the image. I've upgraded the info. at the wish-list.