Page 1 of 1
help with polar charts
Posted: Tue Jan 25, 2005 4:03 pm
by 9235706
I'm updating our existing plotting routines (homebuilt) to TeeChart v7.02. and am having difficulty setting up a polar chart which I want to use to plot azimuth and elevation angles of satellites.
The azimuth is plotted as the angle and runs from 0 - 360 degrees, clockwise with 0/360 at the top of the chart.
The elevation is plotted as the radius and runs from 0 - 90. I want 0 to be the outermost radius and 90 to be inner radius (ie at the centre of the graph).
Although I can set up the axes to show what I want, the data doesn't plot where I expect it to.
I would be grateful if someone can tell me what settings are required.
Posted: Tue Jan 25, 2005 5:03 pm
by narcis
Hi wdsr,
Are you using AddPolar method to populate the polar series?
Posted: Tue Jan 25, 2005 5:53 pm
by 9235706
Narcis
I'm not do anything through code but via the chart editor for the moment. I think I need an explanation on how the polar chart works.
For instance, I don't understand how to set the radial axis from 0 (outer) to 90 (inner). If can invert the right and bottom axes, the labels are inverted, but not for the left/top. I want to be able to set up a radial axis as one complete (diameter) line that will be labelled something like "0, 30, 60 , 90, 60, 30 , 0" from the outer circle to the centre point to the outer circle. I don't care if it's from top to bottom, right to left, or both.
Many thanks
William
Posted: Wed Jan 26, 2005 8:34 am
by Marjan
Hi.
The problem is current polar series does not support inverted radius values. The reason for this is in the TCustomPolarSeries.DrawAxis methhod where right and bottom axis use series vertical and horizontal axis Inverted property while left and top axis do not (left and top axis inverted property is internally set to true so labels are drawn in opposite direction).
The easiest solution is to change TeePolar.pas unit, the TCustomPolarSeries.DrawAxis implementation so that left and top axis will be drawn in opposite direction as right and bottom axis). I'll add this to our to-do list for next maintenance release.
In the meantime another workaround is to manually invert axis labels in TChart OnGetAxisLabel event and do the same with radius value. A bit complicated, but it should work fine.
Posted: Wed Jan 26, 2005 9:28 am
by 9235706
Unfortuneatly, I haven't got the Teechart source, so I'd be grateful if you could add this to your next maintenance release.
For now, I'll work with the events and label the axes manually.
Thanks for your prompt replies
William