display min max values of custom axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

display min max values of custom axis

Post by asupriya » Sat Oct 08, 2011 2:32 pm

I have custom vertical axis for the graph display. How can force that it always displays the minimum and maximum values on the custom vertical axis?

Thanks for your help.

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

Re: display min max values of custom axis

Post by Sandra » Mon Oct 10, 2011 9:53 am

Hello asupriya,

I suggest you, use SetMinMax() method to fix de minimum and maximum of custom Axes as do in next simple code:

Code: Select all

 public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.Styles.Line line1, line2;
        private void InitializeChart()
        {

            tChart1.Aspect.View3D = false;
            line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line2 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line1.FillSampleValues(5);
            line2.FillSampleValues(10);
            Steema.TeeChart.Axis axis1 = new Steema.TeeChart.Axis(tChart1.Chart);
            tChart1.Axes.Custom.Add(axis1);
            line1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left;
            line2.CustomVertAxis = axis1;
            axis1.AxisPen.Color = Color.Red;

            tChart1.Axes.Left.StartPosition = 0;
            tChart1.Axes.Left.EndPosition = 49;
            axis1.StartPosition = 50;
            axis1.EndPosition = 100;
            axis1.SetMinMax(0, 1000);
            
        }
Can you tell us if previous code works as you expected?

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