Page 1 of 1
TPolarBarSeries
Posted: Tue Jun 08, 2004 4:09 pm
by 9337520
Hi, I'm trying to plot a PolarBarSeries of wave data which comprises of wave direction in degrees (the Angle) against wave height in meters (the Radius). The problem I have is that the directional component is being plotted anticlockwise even when I set the series labels to clockwise.
Is there any way to get the direction(Angle) to increment clockwise from north so that 0 deg is north, 90 deg it east, 180 is south and 270 is west.
Regards,
Sean Palmer.
Posted: Wed Jun 09, 2004 4:24 pm
by Pep
Hi Sean,
you can do this :
Code: Select all
Series1.CircleLabels := true;
Series1.ClockWiseLabels := true;
Series1.RotationAngle := 90;
Posted: Thu Jun 10, 2004 10:25 am
by 9337520
Hi Pep,
That's exactly how I have the series parameters set already, the labels are displaying correctly but the data is still displaying the directions anti-clockwise.
If I plot an angle of 299 degrees and radius of 1.0 the PolatBarSeries visually plots the angle at 61 degrees.
Cheers,
Sean.
Posted: Thu Jun 10, 2004 3:31 pm
by Marjan
Hi, Sean.
You can use series OnAfterAdd event to "transform" values from acw to cw. This involves the following operation:
angle = 360 - angle
Something like this:
Code: Select all
procedure TForm1.Series1AfterAdd(Sender: TChartSeries;
ValueIndex: Integer);
begin
Sender.XValue[ValueIndex] := 360 - Sender.XValue[ValueIndex];
end;
Posted: Thu Jun 10, 2004 3:59 pm
by 9337520
Hi Marjan,
Thanks for that, I was basically doing the same but on a calculated field in the dataset.
The point that I think should be raised is that if Series1.ClockWiseLabels is set to true, then the dataset should automatically be converted from acw to cw.
Cheers,
Sean.