Multiple axis that span the entire width of the chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Dan Smith
Newbie
Newbie
Posts: 15
Joined: Fri Sep 23, 2005 4:00 am

Multiple axis that span the entire width of the chart

Post by Dan Smith » Wed Mar 01, 2006 6:02 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 02, 2006 10:49 am

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;
			}
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Mar 06, 2006 9:27 am

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;
}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply