Page 1 of 1

Bar spacing on Gantt in Pocket

Posted: Wed Jan 04, 2006 12:30 pm
by 8119889
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.

Posted: Thu Jan 05, 2006 7:54 am
by Chris
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);
		}