setting minimum value of PolarBar chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Pete
Newbie
Newbie
Posts: 8
Joined: Wed Apr 11, 2012 12:00 am

setting minimum value of PolarBar chart

Post by Pete » Fri Feb 15, 2013 6:53 pm

i would like to have the center value of a Polar chart to be 0. the chart type is PolarBar.

if i set the following properties of the Polar chart, the axes start at 0, but not at the center, meaning that the first "ring" is 0. i would like the center/intersection of the axes lines to be 0.

TChart1.Axes.Left.AutomaticMinimum = false;
TChart1.Axes.Right.AutomaticMinimum = false;
TChart1.Axes.Bottom.AutomaticMinimum = false;
TChart1.Axes.Top.AutomaticMinimum = false;
TChart1.Axes.Left.Minimum = 0.0;
TChart1.Axes.Right.Minimum = 0.0;
TChart1.Axes.Bottom.Minimum = 0.0;
TChart1.Axes.Top.Minimum = 0.0;

thanks,

pete.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: setting minimum value of PolarBar chart

Post by Sandra » Mon Feb 18, 2013 2:28 pm

Hello Pete,

I have made a simple code, where I have added a 0 values in my Polar Series and the value is drawn in correct position:

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;

            Steema.TeeChart.Styles.Polar polar1 = new Polar(tChart1.Chart);
            tChart1.Aspect.View3D = false;
            polar1.Circled = true;
            tChart1.Dock = DockStyle.Fill;
  
            polar1.Brush.Visible = false;

            for (int i = 0; i < 16; i++ )
            {

                polar1.Add(i,i);


            }
            tChart1.Axes.Left.AutomaticMinimum = false;
            tChart1.Axes.Right.AutomaticMinimum = false;
            tChart1.Axes.Bottom.AutomaticMinimum = false;
            tChart1.Axes.Top.AutomaticMinimum = false;
            tChart1.Axes.Left.Minimum = 0.0;
            tChart1.Axes.Right.Minimum = 0.0;
            tChart1.Axes.Bottom.Minimum = 0.0;
            tChart1.Axes.Top.Minimum = 0.0;
            polar1.AngleIncrement = 0;
        }
The zeros as you see in the Chart correspond to axes labels zero values of each axes, are painted displaced because you can see the labels and these aren't overlapped.

Thanks,
Best Regards,
Sandra Pazos / 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

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

Re: setting minimum value of PolarBar chart

Post by Narcís » Tue Feb 19, 2013 8:15 am

Hi Pete,

Complementing Sandra's answer, I don't think this is a bug but normal TeeChart behavior. Actually, zero is in the center but labels are shifted from the axes as done with all other labels. A picture is worth a thousand words:
PolarBarAtZero.png
PolarBarAtZero.png (290.77 KiB) Viewed 4965 times
As shown here, each "0" label overlaps the pen of a neighbor axis. It's not that "0" labels in that axis are not referring to the center of the chart.

If the explanation is not clear please let me know.
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

Pete
Newbie
Newbie
Posts: 8
Joined: Wed Apr 11, 2012 12:00 am

Re: setting minimum value of PolarBar chart

Post by Pete » Tue Mar 19, 2013 1:55 pm

thanks, Sandra and Narcis,

the picture is very similar to what i was seeing. so, most likely the center of my chart is also 0.

pete.

Post Reply