Page 1 of 1

TPolarSeries strange behaviour

Posted: Thu Nov 29, 2012 9:49 am
by 5893357
Good day,

I am trying to use a TPolarSeries and I get strange results.

For example, the following code, which should plot a circle, plots only a dot in the middle of the plot.

Series1->GetVertAxis->Automatic = 1;
Series1->GetHorizAxis->Automatic = 1;
Series1->Circled = 1;
for(int i = 0; i < 360; i+=5)
Series1->AddPolar(i, 10, "", clRed);

if I pan by pressing the right mouse button when I drag the plot, then I can get it to display the circle.

Please advise, or provide example code which works.

thanks in advance

Re: TPolarSeries strange behaviour

Posted: Thu Nov 29, 2012 4:44 pm
by yeray
Hi,

This is because the axes are automatic and the values are all the same (10). When the chart internally calculates the minimum and maximum to fit these values, it considers minimum and maximum to be 10.
Set them to another range including 10 and the values will be shown. Ie:

Code: Select all

  Series1->GetVertAxis->SetMinMax(0,20);
  Series1->GetHorizAxis->SetMinMax(0,20);