Page 1 of 1
display min max values of custom axis
Posted: Sat Oct 08, 2011 2:32 pm
by 13051032
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.
Re: display min max values of custom axis
Posted: Mon Oct 10, 2011 9:53 am
by 10050769
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,