Polar chart - axes not aligned

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Polar chart - axes not aligned

Post by Frances » Fri Nov 21, 2008 7:20 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Nov 21, 2008 10:47 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Mon Nov 24, 2008 12:08 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Nov 24, 2008 8:48 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Tue Nov 25, 2008 7:19 am

I am using version 3 as well.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Nov 25, 2008 7:58 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Wed Nov 26, 2008 12:40 am

it's 3.5.3188.18562.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Nov 26, 2008 8:43 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Thu Nov 27, 2008 2:30 am

I am using now new version 3.5.3225.32185, but still facing same problem.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 27, 2008 11:24 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Fri Nov 28, 2008 12:24 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Nov 28, 2008 8:45 am

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);
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Tue Dec 02, 2008 1:16 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Dec 02, 2008 9:06 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Fri Dec 05, 2008 3:59 am

Hi, it works fine that I need to customized label and angle.

Thanks.

Post Reply