Page 1 of 1

Polar chart - axes not aligned

Posted: Fri Nov 21, 2008 7:20 am
by 13047077
Hi, I am using Polar chart and I am adding (Angle, meter) values in that. But somehow, axes are not aligned. like...

Code: Select all

                       |
                       |
                       |
                       |
           ------------    
                       ------------
                      |
                      |
                      |
                      |
From above, may be you can see that upper portion is ok but the bottom portion get slides little bit to "Left" and "Bottom" side.

my code snippet is :

public partial class PolarChart : UserControl
{
public PolarChart()
{
InitializeComponent();
m_PolarChart.Series.Add(typeof(Polar));

Polar polar = m_PolarChart[0] as Polar;

polar.Pointer.Style = PointerStyles.Cross;

m_PolarChart[0].Add(45, 6);
m_PolarChart[0].Add(20, 15);
m_PolarChart[0].Add(10, 30);

//m_PolarChart.Axes.Left.Automatic = false;
//m_PolarChart.Axes.Left.StartPosition = 0;
//m_PolarChart.Axes.Right.StartPosition = 0;
//m_PolarChart.Axes.Top.StartPosition = 0;

//m_PolarChart.Axes.Left.Maximum = 0;
//m_PolarChart.Axes.Left.Maximum = 50;
//m_PolarChart.Axes.Right.Maximum = 50;
//m_PolarChart.Axes.Bottom.StartPosition = 0;

//polar.Chart.Axes.Left.Minimum= 0;
//polar.Chart.Axes.Left.Maximum = 50;
//polar.Chart.Axes.Right.Minimum = 0;
//polar.Chart.Axes.Right.Maximum =50;

//polar.Chart.Axes.Depth.Minimum = 0;
//polar.Chart.Axes.DepthTop.Minimum = 0;

//polar.Chart.Axes.Left.StartPosition= 0;
//polar.Chart.Axes.Right.StartPosition = 0;
//polar.Chart.Axes.Top.StartPosition = 0;
//polar.Chart.Axes.Bottom.StartPosition = 0;
//polar.HorizAxis = 0;
//polar.VertAxis = 0;
//m_PolarChart.Axes.Depth.StartPosition = 0;

//m_PolarChart.Chart[0].Add(45,0);
//m_PolarChart.Chart[0].Add(120, 15);
//m_PolarChart.Chart[0].Add(210, 30);


//m_PolarChart.Axes.Bottom.AutomaticMinimum = false;
//m_PolarChart.Axes.Bottom.Minimum = -5;

}

Any solution?

Thanks in advance

Posted: Fri Nov 21, 2008 10:47 am
by narcis
Hi Frances,

Can you please confirm this only happens with 3D charts? I'm afraid Polar series was only designed for 2D charts, in which case it works fine. Anyway, I'll add this issue to the wish-list to be enhanced for future releases.

Thanks in advance.

Posted: Mon Nov 24, 2008 12:08 am
by 13047077
Yes, I am using it for 2D not 3D.

I am manually setting Aspect.View3D = false;

And I can see that It's working in your examples, may be because they are not WPF?

Thanks.

Posted: Mon Nov 24, 2008 8:48 am
by narcis
Hi Frances,

2D Polar series with WPF also work fine for me here using latest v3 maintenance release available at the client area. Which is the exact version you are using?

Thanks in advance.

Posted: Tue Nov 25, 2008 7:19 am
by 13047077
I am using version 3 as well.

Posted: Tue Nov 25, 2008 7:58 am
by narcis
Hi Frances,

Thanks for the information but could you specify the exact v3 build number you are using? As you can see in v3's release notes a number of maintenance releases have been published since the version was first published.

Thanks in advance.

Posted: Wed Nov 26, 2008 12:40 am
by 13047077
it's 3.5.3188.18562.

Posted: Wed Nov 26, 2008 8:43 am
by narcis
Hi Frances,

Thanks for the info. There's a newer version available at the client area. Could you please uninstall your current version, install latest one and check if this solves the problem at your end?

Thanks in advance.

Posted: Thu Nov 27, 2008 2:30 am
by 13047077
I am using now new version 3.5.3225.32185, but still facing same problem.

Posted: Thu Nov 27, 2008 11:24 am
by narcis
Hi Frances,

Thanks for the information.

Using the WPFDemo shipped with latest TeeChart for .NET v3 maintenance release, which is available at TeeChart's program group, I get that Polar 3D series:

Image

Which certainly has unaligned axes. However, setting this chart to 2D I get this:

Image

Please notice that in the 2D series axes are aligned. Can you reproduce this behaviour at your end?

If problem persists can you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Posted: Fri Nov 28, 2008 12:24 am
by 13047077
Thanks NarcĂ­s Calvet,

I found the problem. I was setting View3D to false at just after creation of the chart, but now I moved that setter of View3D to false as very last statement of the code and it works fine.

I got this idea from the example you gave above that you are setting View3D to false at run time and it works so, I should do something like that.

But, I think that is bug. It should work other way as I have already created the chart.

Any way, I have one more thing to ask you. Is it possible to start angle = 0 from top rather than start from right (default)?

Like....

Code: Select all

                   0
              315      45
          270              90
             225       135
                   180 
Thanks in advance.

Posted: Fri Nov 28, 2008 8:45 am
by narcis
Hi Frances,
But, I think that is bug. It should work other way as I have already created the chart.
I'm not able to reproduce this here. Have you checked that you don't set it to 3D latter in the code? If the problem persists please send us a simple example project we can run "as-is" to reproduce the problem here.
Any way, I have one more thing to ask you. Is it possible to start angle = 0 from top rather than start from right (default)?


The only solution I can think of to achieve what you request is doing something like this:

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private Steema.TeeChart.Styles.Polar polar1;

		void InitializeChart()
		{
			tChart1.Aspect.View3D = false;
			polar1 = new Steema.TeeChart.Styles.Polar(tChart1.Chart);
			polar1.CircleLabels = false;
			
			AddPolar(0, 10);
			AddPolar(60, 20);
			AddPolar(100, 30);
			AddPolar(150, 25);
			AddPolar(200, 35);
			AddPolar(240, 15);
			AddPolar(300, 5);
			AddPolar(360, 10);
		}

		private void AddPolar(int angle, int value)
		{
			double tmp = (angle + 90) % 360;
			polar1.Add(tmp, value);
		}

Posted: Tue Dec 02, 2008 1:16 am
by 13047077
Thanks, it works, now I can plot the with starting position at top rather than right. But, how can I start label from top side in Clockwise direction. Without label, it seems to be meaning less in my case.

Is it possible?

thanks in advance.

Posted: Tue Dec 02, 2008 9:06 am
by narcis
Hi Frances,

I'm afraid this is not possible for now. I've added to the wish-list that a GetCircleLabels event is implemented for Polar series.

In the meantime you could create your custom Polar series as in the example I posted here.

Posted: Fri Dec 05, 2008 3:59 am
by 13047077
Hi, it works fine that I need to customized label and angle.

Thanks.