Page 1 of 1

Maximum value of Left Axis

Posted: Thu Apr 18, 2013 1:08 pm
by 15664347
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

Re: Maximum value of Left Axis

Posted: Thu Apr 18, 2013 4:14 pm
by 10050769
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,

Re: Maximum value of Left Axis

Posted: Mon Apr 22, 2013 10:20 am
by 15664347
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

Re: Maximum value of Left Axis

Posted: Mon Apr 22, 2013 2:07 pm
by 10050769
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,

Re: Maximum value of Left Axis

Posted: Tue Apr 23, 2013 2:38 pm
by 15664347
Hi Sandra,

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

Marijke

Re: Maximum value of Left Axis

Posted: Wed Apr 24, 2013 7:17 am
by 10050769
Hello Marijke,

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

Thanks,