Polar Series Axis Labels

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
John
Newbie
Newbie
Posts: 7
Joined: Fri Aug 20, 2010 12:00 am
Contact:

Polar Series Axis Labels

Post by John » Thu Apr 07, 2011 11:00 pm

When I draw a Polar series wome of the angle labels, located on the outside circle, are getting clipped. It is happening to labels that are greater than 90 degrees. See attached JPEG file.
Chart1.jpg
Chart1.jpg (105.48 KiB) Viewed 4907 times

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

Re: Polar Series Axis Labels

Post by Sandra » Fri Apr 08, 2011 2:13 pm

Hello John,

Using next simple code and using last version of TeeChart.Net:

Code: Select all

        Steema.TeeChart.Styles.Polar series1;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            tChart1.Dock = DockStyle.Fill;
            series1 = new Steema.TeeChart.Styles.Polar(tChart1.Chart);
            series1.FillSampleValues();
            series1.Circled = true;
            series1.Brush.Visible = false;
            series1.CircleLabels = true;
        }
And I have gotten next image:
PolarSeries.jpg
PolarSeries.jpg (117.65 KiB) Viewed 4794 times
Could you check if your problem appears using previous code? Moreover, can you tell us, which version of TeeChart.Net are you using, now?

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

John
Newbie
Newbie
Posts: 7
Joined: Fri Aug 20, 2010 12:00 am
Contact:

Re: Polar Series Axis Labels

Post by John » Fri Apr 08, 2011 4:33 pm

I will check your code tomorrow. I wanted to add that I am using the following event handlers to clip data outside the display space.

private void polarChart_BeforeDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.ClipEllipse(polarChart.Chart.ChartRect);
}

private void polarChart_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.ClearClipRegions();
}

I am wondering if this causes the labels to be clipped.

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

Re: Polar Series Axis Labels

Post by Sandra » Mon Apr 11, 2011 10:41 am

Hello John,

I could reproduce your problem and this is caused to ClipEllipse. Could you explain exactly because you need ClipEllipse, so we can find a solution for it ? On the other hand, if you reduce the margin of labels, you can get that these appears correctly . You can do something as next:

Code: Select all

        Steema.TeeChart.Styles.Polar series1;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            series1 = new Steema.TeeChart.Styles.Polar(tChart1.Chart);
            series1.FillSampleValues();
            series1.Circled = true;
            series1.Brush.Visible = false;
            series1.CircleLabels = true;
            series1.LabelsMargin = 0;
           tChart1.BeforeDraw +=new Steema.TeeChart.PaintChartEventHandler(tChart1_BeforeDraw);
           tChart1.AfterDraw +=new Steema.TeeChart.PaintChartEventHandler(tChart1_AfterDraw);
         
        }
        private void tChart1_BeforeDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            Rectangle rect = tChart1.Chart.ChartRect;
            g.ClipEllipse(rect);
        }

        private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            g.ClearClipRegions();
        }
I hope will helps.
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

Post Reply