Page 1 of 1

Polar Series Axis Labels

Posted: Thu Apr 07, 2011 11:00 pm
by 15656770
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 4873 times

Re: Polar Series Axis Labels

Posted: Fri Apr 08, 2011 2:13 pm
by 10050769
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 4760 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,

Re: Polar Series Axis Labels

Posted: Fri Apr 08, 2011 4:33 pm
by 15656770
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.

Re: Polar Series Axis Labels

Posted: Mon Apr 11, 2011 10:41 am
by 10050769
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,