Page 1 of 1

Gantt issues in Pocket.dll

Posted: Mon Dec 19, 2005 4:00 pm
by 8119889
Hi,

Struggling to get the chart to display a Gantt properly in Pocket.

I'm adding values to the data series as follows (VB.net)

Me.EventsDataSeries.Add(CDate(FlexGrid.GetData(rw.Index, 2)), CDate(FlexGrid.GetData(rw.Index, 3)))

Where the flex grid columns 2 and 3 contain valid dates. Some sample data is shown below:

PoorSeals 19/12/2005 13:08:01 19/12/2005 13:08:18
Coder 19/12/2005 13:09:23 19/12/2005 13:11:23
Adjust 18/12/2005 14:03:22 18/12/2005 15:45:01

When this data is added to the data series all the bars have the same start and end points and all start at the far left of the chart even though this is not the start date.

Any ideas?

Posted: Tue Dec 20, 2005 2:49 pm
by narcis
Hi Bernard,

Which TeeChart version are you using? It works fine here using latest TeeChart for .NET v2 release. If you are using this version and the problem still persists, could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Posted: Tue Dec 20, 2005 5:27 pm
by 8119889
Downloaded V2 and still doesn't work.

I can reproduce the problem in your compact framework sample.

Add the following lines of code to the combo changed method:

tChart1.Axes.Bottom.Automatic = false;
tChart1.Axes.Bottom.AutomaticMaximum=false;
tChart1.Axes.Bottom.AutomaticMinimum=false;
tChart1.Axes.Bottom.SetMinMax(DateTime.Now.AddMinutes(-20),DateTime.Now.AddMinutes(20));
tChart1[0].Add(DateTime.Now.AddMinutes(-10),DateTime.Now);
tChart1[0].Add(DateTime.Now.AddMinutes(-5),DateTime.Now);
tChart1[0].Add(DateTime.Now.AddMinutes(-2),DateTime.Now.AddMinutes(10));

What this is trying to do is to add three events that have various start and end times, the min and max is set so the events can be seen clearly. When run on the emulator I get only two of the events visible and dates are wrong....

Posted: Fri Dec 23, 2005 11:23 am
by narcis
Hi Bernard,

Thanks for your code, I could reproduce it here and the problem is that you are using the wrong overload for the Add method. The following code works fine:

Code: Select all

			tChart1.Axes.Bottom.Automatic = false;
			tChart1.Axes.Bottom.AutomaticMaximum=false;
			tChart1.Axes.Bottom.AutomaticMinimum=false;
			tChart1.Axes.Bottom.SetMinMax(DateTime.Now.AddMinutes(-20),DateTime.Now.AddMinutes(20));
			(tChart1[0] as Steema.TeeChart.Styles.Gantt).Add(DateTime.Now.AddMinutes(-10),DateTime.Now, 1, Color.Tan);
			(tChart1[0] as Steema.TeeChart.Styles.Gantt).Add(DateTime.Now.AddMinutes(-5),DateTime.Now, 2, Color.SaddleBrown);
			(tChart1[0] as Steema.TeeChart.Styles.Gantt).Add(DateTime.Now.AddMinutes(-2),DateTime.Now.AddMinutes(10), 3, Color.SeaGreen);

Thanks

Posted: Wed Jan 04, 2006 12:26 pm
by 8119889
Thanks that seems to work..