Bar spacing on Gantt in Pocket

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Glynn
Newbie
Newbie
Posts: 14
Joined: Tue Apr 08, 2003 4:00 am

Bar spacing on Gantt in Pocket

Post by Glynn » Wed Jan 04, 2006 12:30 pm

I have my Gantt working now in Pocket (thanks for the support!) but now I have another question..

The chart engine seems to distribute the data series bars evenly across the height of the chart. So when you have only two bars you get one at the top and one at the bottom.

Is there an easy way to stop this and get the engine to stack them starting from the top.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Thu Jan 05, 2006 7:54 am

Hi Bernard,

The easiest way is to use the Steema.TeeChart.Axis.SetMinMax() method, e.g.

Code: Select all

		private void Form2_Load(object sender, System.EventArgs e)
		{
			tChart1.Aspect.View3D = false;
			gantt1.Add(DateTime.Today, DateTime.Today.AddDays(3), 5, Color.Blue); 
			gantt1.Add(DateTime.Today.AddDays(-2), DateTime.Today.AddDays(1), 4, Color.Red);
			tChart1.Axes.Left.MaximumOffset = 10;	//10 pixels from top axis to first gantt bar
			tChart1.Axes.Left.SetMinMax(0,5);
		}
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply