Hi,
I'm trying to use the function AngleToPos in a PolarSeries. The resulting X, Y value gives me the right angle, but the radius is off for some reason.
Series1->AddPolar(10, 50);
Series1->AddPolar(20, 50);
int ax = Series1->CalcXPos(0);
int ay = Series1->CalcYPos(0);
This function gives me the right X, Y value. However, if I use
Series1->AngleToPos(10 * pi / 180, 50, 50, X, Y);
The radius I get from the X, Y values is way off.
Is there a scale of some sort that I need to use to convert the radius?
Thanks.
-Bill
How does AngleToPos work?
Re: How does AngleToPos work?
Hello Bill,
As the help descritpion for the AngleToPos function says:
As the help descritpion for the AngleToPos function says:
So you should proceed as follows:help wrote:Description
The AngleToPos functions returns the exact Screen position for a given pair of Angle and Radius values.
Angles must be expressed in radians from 0 to 2*PI. Radius parameter is in number of pixels.
Code: Select all
Series1.AngleToPos(10 * pi / 180, Chart1.Axes.Bottom.CalcSizeValue(50), Chart1.Axes.Left.CalcSizeValue(50), ax, ay);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |