Page 1 of 1

Number of "X" Pixels to display a series without borders.

Posted: Fri Jun 19, 2009 7:36 pm
by 14048359
Hi,

I use the Teechart in winCE.
I would like know if it’s possible to have the number of horizontal pixels without the left and right borders that the chart have. For the moment, I take the “Chart.ChartRect.Width - 2”. The - 2 is to remove the left and right borders, but it’s doesn’t work well in some case, example if the chart is displayed in 3D, the borders seems take 3 pixels instead 2 for the left and right border together.
I need of that to know the numbers of pixels are used to display a series. It’s very useful for me because I should average my curve before to send it to the chart because my curve contains very too many points. But to have the better average, I need this information.

Thanks.
Dany

Re: Number of "X" Pixels to display a series without borders.

Posted: Mon Jun 22, 2009 8:26 am
by 10050769
Hello Dany,

I make a simple example using property AxisPen of Left, Right Axes, Please check that next code or similar works fine in your application.

InitializeChart:

Code: Select all

        private int n;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = true;
            Steema.TeeChart.Styles.Bar bar = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            bar.FillSampleValues();
            Rectangle rect = new Rectangle();
            rect = tChart1.Chart.ChartRect;
            n = (rect.Width) - (tChart1.Axes.Left.AxisPen.Width);
            this.Text = n.ToString();

        }

if this not solve your problem, please, could you 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. Now you can upload your attachment directly in the post.
Thanks,