Page 1 of 1

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

Posted: Mon Jan 31, 2005 9:52 pm
by 8127860
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

Posted: Tue Feb 01, 2005 7:10 am
by Marjan
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;

works

Posted: Wed Feb 02, 2005 3:51 pm
by 8127860
Thanks Marjan. It works perfectly.

Amy