Same StartValues

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Cinin
Newbie
Newbie
Posts: 9
Joined: Thu Jul 21, 2005 4:00 am

Same StartValues

Post by Cinin » Tue Aug 30, 2005 2:07 pm

Hi all,

in a gantt chart I have some tasks in the same series on different left axes position with the same StartValue. Ex:

gantt.StartValues[0] = 123456;
gantt.StartValues[1] = 123456;

knowing the start value I want to retreive the StartValues index but doing:

int index = gantt.StartValues.IndexOf(123456);

index is always 0 and I don't find a function like IndexOf to call again to find the second index.

Any idea? Thanks in advance

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

Post by Narcís » Wed Aug 31, 2005 9:24 am

Hi Cinin,

You could do something like the code below to get all points indexes with a fixed StartValue.

Code: Select all

			for (int index=0;index<gantt1.Count;++index)
			{
				if (gantt1.StartValues[index]==12345)
				{
					tChart1.Header.Text=tChart1.Header.Text+", "+index.ToString();
				}
			}
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

Cinin
Newbie
Newbie
Posts: 9
Joined: Thu Jul 21, 2005 4:00 am

Post by Cinin » Wed Aug 31, 2005 3:33 pm

Thank you,

this is the way I'm doing it now but I was looking for something more "smart".

Regards

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 Sep 01, 2005 10:38 am

Hi Cinin,

I'm sorry but it's the way for doing it. We maybe could add a method like NextIndexOf or so but internally it would do something similar to what I did so it's not worth.
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