Maximum value of Left Axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
OMP
Newbie
Newbie
Posts: 21
Joined: Mon Dec 10, 2012 12:00 am

Maximum value of Left Axis

Post by OMP » Thu Apr 18, 2013 1:08 pm

Dear,

We have an issue when trying to set the maximum value for the left axis.

This is my code snippet:

Code: Select all

chartToTest.Aspect.View3D = false;

chartToTest.Axes.Left.AutomaticMaximum = false;
chartToTest.Axes.Left.Maximum = 1400;

Steema.TeeChart.Styles.Bar bar = new Steema.TeeChart.Styles.Bar(chartToTest.Chart);
bar.MarksOnBar = true;

bar.Add(1, 1000);
bar.Add(2, 1200);
bar.Add(3, 900);
bar.Add(4, 800);
So, as you can see, I set the maximum value for the left axis to 1400.
But, if you take a look to the chart in the attached screenshot, you can see that the maximum is 1550.

What can I do to have the maximum set to 1400.

Thanks in advance,
Marijke Van Bergen
Attachments
Capture.PNG
Capture.PNG (42.28 KiB) Viewed 8745 times

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

Re: Maximum value of Left Axis

Post by Sandra » Thu Apr 18, 2013 4:14 pm

Hello Marijke Van Bergen,

My recommendation is change the value of MaximumOffset if you want the axis left values are changed correctly. See next line of code:

Code: Select all

 tChart1.Axes.Left.MaximumOffset = 1;
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

OMP
Newbie
Newbie
Posts: 21
Joined: Mon Dec 10, 2012 12:00 am

Re: Maximum value of Left Axis

Post by OMP » Mon Apr 22, 2013 10:20 am

Hello Sandra,

Thanks for your suggestion, but unfortunately this does not help.
I added the MaximumOffset to my code, but chart still looks the same.

Kind regards,
Marijke

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

Re: Maximum value of Left Axis

Post by Sandra » Mon Apr 22, 2013 2:07 pm

Hello Marijke,

Could you tell us which version of TeeChartFor.Net are you using, because next code works fine for me in latest version of TeeChartFor.Net 2012?

Code: Select all

 private void InitializeChart()
        {
           tChart1.Aspect.View3D = false;
            Steema.TeeChart.Styles.Bar bar = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            bar.MarksOnBar = true;
            bar.Add(1, 1000);
            bar.Add(2, 1200);
            bar.Add(3, 900);
            bar.Add(4, 800);
            tChart1.Axes.Left.MaximumOffset = 1;
            tChart1.Axes.Left.AutomaticMaximum = false;
            tChart1.Axes.Left.Maximum = 1400;
           } 

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

OMP
Newbie
Newbie
Posts: 21
Joined: Mon Dec 10, 2012 12:00 am

Re: Maximum value of Left Axis

Post by OMP » Tue Apr 23, 2013 2:38 pm

Hi Sandra,

Sorry... my mistake. I tested once more and now I see that it works. Thanks for your help.

Marijke

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

Re: Maximum value of Left Axis

Post by Sandra » Wed Apr 24, 2013 7:17 am

Hello Marijke,

I am glad that my code works for you :D.

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