Page 1 of 1

Adjusting start position of axis

Posted: Sun Nov 14, 2010 9:42 am
by 15057312
I need to adjust the aspect ratio of the points chart. If I set the Left and right axis start position to 25%

Points1.Chart.Axes.Left.StartPosition = 25
Points1.Chart.Axes.Right.StartEndPositionUnits = Steema.TeeChart.PositionUnits.Percent
Points1.Chart.Axes.Right.StartPosition = 25

The Left and Right Axis plot correctly, but if I add the top axis, it does not plot in the correct position

Points1.Chart.Axes.Right.Visible = True
Points1.Chart.Axes.Bottom.Visible = True
Points1.Chart.Axes.Left.Visible = True
Points1.Chart.Axes.Top.Visible = True

See picture
Points1.jpg
Points1.jpg (49.1 KiB) Viewed 6789 times

Re: Adjusting start position of axis

Posted: Mon Nov 15, 2010 11:03 am
by 10050769
Hello lilo,

I suggest you, use property of Axes RelativePosition for change position of Top axis, as do in next example:

Code: Select all

private void InitializeChart()
        {

            tChart1.Aspect.View3D = false;
            tChart1.Dock = DockStyle.Fill;
            for (int i = 0; i < 5; i++)
            {
                Steema.TeeChart.Styles.Points series1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
                series1.FillSampleValues(10);
                series1.Pointer.HorizSize = 7;
                series1.Pointer.VertSize = 7;
                if (i < 2)
                {

                    series1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right;
                    series1.HorizAxis = Steema.TeeChart.Styles.HorizontalAxis.Top;
                }
                
            }
            
            tChart1.Axes.Left.StartPosition = 25;
            tChart1.Axes.Right.StartEndPositionUnits = Steema.TeeChart.PositionUnits.Percent;
            tChart1.Axes.Right.StartPosition = 25;
            tChart1.Axes.Top.RelativePosition = 25;
          
}
Could you tell us, if previous code works fine for you?

I hope will helps.

Thanks,

Re: Adjusting start position of axis

Posted: Mon Nov 15, 2010 8:22 pm
by 15057312
This works OK, but a new problem is introduced. The labels on the top axis are not positioned correctly. See picture.
Points2.jpg
Points2.jpg (63.19 KiB) Viewed 6788 times

Re: Adjusting start position of axis

Posted: Tue Nov 16, 2010 12:11 pm
by 10050769
Hello lilo,

I couldn't reproduce your problem using last version of TeeChart.Net. I have got next image where axes labels see correctly:
Chart1.jpg
Chart1.jpg (51.93 KiB) Viewed 6753 times
Please, you could send us a simple project so we can reproduce your problem here? Also, can you say us what number of build of version 4 are you using now?

Thanks,