Page 1 of 1

Sorted points in Polar Chart

Posted: Sat Apr 06, 2013 6:22 am
by 15664334
I am adding points to a polar series:

Code: Select all

            mRoundnessSeries.Add(0, 40);
            mRoundnessSeries.Add(60, 80);
            mRoundnessSeries.Add(120, 120);
            mRoundnessSeries.Add(180, 160);
            mRoundnessSeries.Add(150, 150);
What I am then seeing is:

Image

But what I would like to see is:

Image

I had already tried to set

Code: Select all

 mRoundnessSeries.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending; 
but that did not change anything in the display.

Any idea on how I can achieve the desired sorted display of points?

Re: Sorted points in Polar Chart

Posted: Mon Apr 08, 2013 8:46 am
by 10050769
Hello hb-dru,

If you want order the values, you need add the type of order but you need sort the values, too. You must add after select the type order the method Sort() as do in next line of code:

Code: Select all

mRoundnessSeries.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
mRoundnessSeries.XValues.Sort(); 
Could you confirm if it works in your end?

Thanks,

Re: Sorted points in Polar Chart

Posted: Tue Apr 09, 2013 5:21 am
by 15664334
I now changed my code to

Code: Select all

 mRoundnessSeries.Add(0, 40);
            mRoundnessSeries.Add(60, 80);
            mRoundnessSeries.Add(120, 120);
            mRoundnessSeries.Add(180, 150);
            mRoundnessSeries.Add(150, 160);
            mRoundnessSeries.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            mRoundnessSeries.XValues.Sort();
but still the points are not displayed in sorted order. (They are still displayed as shown in the first picture above.)

Re: Sorted points in Polar Chart

Posted: Tue Apr 09, 2013 9:12 am
by 10050769
Hello hb-dru,

Could you tell us which version of TeeChartFor.Net are you using? Because, I inform you, next code works in correct way in last version of TeeChartFor.Net build number(4.1.2012.01312)

Code: Select all

       private void InitializeChart()
        {
            tChart1.Aspect.View3D= false;
            tChart1.Legend.LegendStyle = LegendStyles.Series; 
            //Initialize PolarSeries
            Steema.TeeChart.Styles.Polar polar1 = new Polar(tChart1.Chart);
            polar1.Circled = true;
            polar1.CircleLabels = true;
            polar1.CircleLabelsRotated = true;
            polar1.RotationAngle = 90;
            polar1.CloseCircle = false;
            polar1.bBrush.Visible = false; 
            //Populate
            polar1.Add(0, 40);
            polar1.Add(60, 80);
            polar1.Add(120, 120);
            polar1.Add(180, 160);
            polar1.Add(150, 150);
            //Color and Pointer
            polar1.Color = Color.Green;
            polar1.Pen.Color = polar1.Color; 
            polar1.Pointer.Visible = true;
            polar1.Pointer.Style = PointerStyles.Circle;
            polar1.XValues.Order = ValueListOrder.Ascending;
            polar1.XValues.Sort();
            //Axes
            tChart1.Axes.Bottom.SetMinMax(0, 200);
            tChart1.Axes.Left.SetMinMax(0, 200);
        }
Thanks,

Re: Sorted points in Polar Chart

Posted: Wed Apr 10, 2013 5:48 am
by 15664334
I have version 4.1.2012.9283 of TeeChart and I can confirm that your code sample works as expected. But the test data you are using is not the same as in my sample. You are using:

Code: Select all

            polar1.Add(0, 40);
            polar1.Add(60, 80);
            polar1.Add(120, 120);
            polar1.Add(180, 160);    // y-Value is 160. This is not what I have in my data.
            polar1.Add(150, 150);    // y-Value is 150. This is not what I have in my data.
but I want

Code: Select all

            polar1.Add(0, 40);
            polar1.Add(60, 80);
            polar1.Add(120, 120);
            polar1.Add(180, 150);
            polar1.Add(150, 160);
and if I use the data that I want with your sample the points still do not get sorted in ascending angle order.

Re: Sorted points in Polar Chart

Posted: Wed Apr 10, 2013 8:21 am
by 10050769
Hello hb-dru,

Sorry, I have used your initial data. I have try to reproduce your problem again, using 4.1.2012.9283 and 4.1.2012.01312 and finally I can reproduce your problem. But, I have checked the same code using last TeeChartFor.Net source code and the problem is solved. For this reason, I inform you the problem is fixed for next maintenance release of TeeChartFor.Net. At the moment, you can change the order manually of your data as a workaround. Please see next code:

Code: Select all

  private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            tChart1.Legend.LegendStyle = LegendStyles.Series;
            //Initialize PolarSeries
            Steema.TeeChart.Styles.Polar polar1 = new Polar(tChart1.Chart);
            polar1.Circled = true;
            polar1.CircleLabels = true;
            polar1.CircleLabelsRotated = true;
            polar1.RotationAngle = 90;
            polar1.CloseCircle = false;
            polar1.bBrush.Visible = false;
            //Populate
            polar1.Add(0, 40);
            polar1.Add(60, 80);
            polar1.Add(120, 120);
            polar1.Add(150, 160);
            polar1.Add(180, 150);
            //Color and Pointer
            polar1.Color = Color.Green;
            polar1.Pen.Color = polar1.Color;
            polar1.Pointer.Visible = true;
            polar1.Pointer.Style = PointerStyles.Circle;
            //polar1.XValues.Order = ValueListOrder.Ascending;
            //polar1.XValues.Sort();
            //Axes
            tChart1.Axes.Bottom.SetMinMax(0, 200);
            tChart1.Axes.Left.SetMinMax(0, 200);
        }
Thanks,

Re: Sorted points in Polar Chart

Posted: Fri Apr 19, 2013 1:57 pm
by 15664334
Any idea on when the next maintenance release will be available?

Re: Sorted points in Polar Chart

Posted: Fri Apr 19, 2013 2:28 pm
by 10050769
Hello hb-dru,

Sorry but I can not provide you a estimate date. I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.

Thanks,