How to make value "Y" axis to be 30% higher than Y

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Amy
Newbie
Newbie
Posts: 8
Joined: Mon Nov 15, 2004 5:00 am

How to make value "Y" axis to be 30% higher than Y

Post by Amy » Mon Jan 31, 2005 9:52 pm

All,

In the line chart, if the Y data are all 1. the value of "Y" axis is also 1. Now, I want to make the value of "Y" axis is 1.3, so the line is not top of the chart.

One more another question, how can I make Chart's backgroud color to be white? Default is gray color

Thanks,
Amy

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue Feb 01, 2005 7:10 am

Hi.
Now, I want to make the value of "Y" axis is 1.3, so the line is not top of the chart.
You can (for example) check if all values are the same and then according to this info, manually rescale axis. Something along these lines:

Code: Select all

if (line1.YValues.Maximum == line1.YValues.Minimum)
      {
        double center = line1.YValues.Minimum;
        line1.GetVertAxis.SetMinMax(0.7*center,1.3*center);
        line1.GetVertAxis.AdjustMaxMin();
      }
      else line1.GetVertAxis.Automatic = true;
backgroud color to be white

Code: Select all

tChart1.Panel.Brush.Color = Color.White;
Marjan Slatinek,
http://www.steema.com

Amy
Newbie
Newbie
Posts: 8
Joined: Mon Nov 15, 2004 5:00 am

works

Post by Amy » Wed Feb 02, 2005 3:51 pm

Thanks Marjan. It works perfectly.

Amy

Post Reply