Page 1 of 1
Multiple axis that span the entire width of the chart
Posted: Wed Mar 01, 2006 6:02 pm
by 9638380
Hello,
I have a chart with 5 series (horizontal lines) and 5 axis. Is it possible to 'stack' the axis so that each axis spans the entire width of the chart, rather than taking up a designated percentage of the chart?
Thanks,
Dan
Posted: Thu Mar 02, 2006 10:49 am
by narcis
Hi Dan,
Yes, this is possible. You can do something like this:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
for (int j=0;j<tChart1.Series.Count;++j)
tChart1[j].FillSampleValues();
tChart1.Panel.MarginLeft=20;
for (int i=0;i<tChart1.Axes.Custom.Count;++i)
{
tChart1[i].CustomVertAxis=tChart1.Axes.Custom[i];
tChart1.Axes.Custom[i].Visible=true;
tChart1.Axes.Custom[i].Grid.Visible=false;
tChart1.Axes.Custom[i].RelativePosition=-7*(i+1);
tChart1.Axes.Custom[i].StartPosition=0;
tChart1.Axes.Custom[i].EndPosition=100;
}
}
Posted: Mon Mar 06, 2006 9:27 am
by narcis
Hi Dan,
You can also use something like:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
line1.FillSampleValues();
line2.FillSampleValues();
Bitmap bmp = tChart1.Bitmap;
axis1.PositionUnits = Steema.TeeChart.PositionUnits.Pixels;
axis1.RelativePosition = 0 - 30;
axis1.StartPosition = 0;//tChart1.Axes.Left.IStartPos;
axis1.EndPosition = tChart1.Axes.Left.IEndPos - tChart1.Axes.Left.IStartPos;
}