Floatingpoint numbers in ColorGrid

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
dotnetjunkee
Newbie
Newbie
Posts: 20
Joined: Fri Dec 05, 2003 5:00 am

Floatingpoint numbers in ColorGrid

Post by dotnetjunkee » Fri Jun 16, 2006 7:18 am

Hello!

I'm facing problems populating a ColorGrid!

I want to add values like this:

this.colorGrid1.Add(4.2, 4.3, 5.5);
this.colorGrid1.Add(5.3, 3.1, 5.5);
this.colorGrid1.Add(4.2, -2.5, 6.2);
this.colorGrid1.Add(5.3, 1.0, 6.2);

It is unavoidable to add floating point numbers and they have to be displayed accurately.

But what I get running this example is a "System.IndexOutOfRangeException".

Have you got any advice? Should I use a different control?

Many 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 » Fri Jun 16, 2006 9:32 am

Hello dotnetjunkee,

Which TeeChart version are you using? It works fine for me here using latest debug build release from 9th June 2006. This debug build is available at the customer area, can you please test if it works at your end?
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

dotnetjunkee
Newbie
Newbie
Posts: 20
Joined: Fri Dec 05, 2003 5:00 am

Post by dotnetjunkee » Fri Jun 16, 2006 10:18 am

I'm using version 1.1.2307.20497.

Unfortunately it does not work with a Surface-style either.

What i've found out so far is that the following lines work fine:

this.colorGrid1.Add((double)0.0, (double)1.0, (double)1.0);
this.colorGrid1.Add((double)1.0, (double)3.0, (double)1.0);
this.colorGrid1.Add((double)2.0, (double)3.0, (double)1.0);

this.colorGrid1.Add((double)0.0, (double)1.0, (double)2.0);
this.colorGrid1.Add((double)1.0, (double)3.0, (double)2.0);
this.colorGrid1.Add((double)2.0, (double)3.0, (double)2.0);

But these lines of code do not work:

this.colorGrid1.Add((double)0.0, (double)1.0, (double)1.0);
this.colorGrid1.Add((double)1.0, (double)3.0, (double)1.0);
this.colorGrid1.Add((double)2.0, (double)3.0, (double)1.0);

this.colorGrid1.Add((double)0.0, (double)1.0, (double)3.2);
this.colorGrid1.Add((double)1.0, (double)3.0, (double)3.2);
this.colorGrid1.Add((double)2.0, (double)3.0, (double)3.2);

It seems to me that each single step has to be added (1, 2, 3,...) But this is not possible due to my data

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 Jun 16, 2006 10:27 am

Hi dotnetjunkee,

It works fine for me here using the same TeeChart for .NET version as you and setting IrregularGrid to true:

Code: Select all

			this.colorGrid1.Add((double)0.0, (double)1.0, (double)1.0); 
			this.colorGrid1.Add((double)1.0, (double)3.0, (double)1.0); 
			this.colorGrid1.Add((double)2.0, (double)3.0, (double)1.0); 

			this.colorGrid1.Add((double)0.0, (double)1.0, (double)3.2); 
			this.colorGrid1.Add((double)1.0, (double)3.0, (double)3.2); 
			this.colorGrid1.Add((double)2.0, (double)3.0, (double)3.2); 

			this.colorGrid1.IrregularGrid=true;
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

dotnetjunkee
Newbie
Newbie
Posts: 20
Joined: Fri Dec 05, 2003 5:00 am

Thank you

Post by dotnetjunkee » Fri Jun 16, 2006 10:37 am

Thank you!

It works fine here now as welL!

Post Reply