Gantt issues in Pocket.dll

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

Gantt issues in Pocket.dll

Post by Glynn » Mon Dec 19, 2005 4:00 pm

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?

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

Post by Narcís » Tue Dec 20, 2005 2:49 pm

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.
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

Glynn
Newbie
Newbie
Posts: 14
Joined: Tue Apr 08, 2003 4:00 am

Post by Glynn » Tue Dec 20, 2005 5:27 pm

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....

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

Post by Narcís » Fri Dec 23, 2005 11:23 am

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);
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

Glynn
Newbie
Newbie
Posts: 14
Joined: Tue Apr 08, 2003 4:00 am

Thanks

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

Thanks that seems to work..

Post Reply