Page 1 of 1

Floatingpoint numbers in ColorGrid

Posted: Fri Jun 16, 2006 7:18 am
by 8123141
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!

Posted: Fri Jun 16, 2006 9:32 am
by narcis
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?

Posted: Fri Jun 16, 2006 10:18 am
by 8123141
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

Posted: Fri Jun 16, 2006 10:27 am
by narcis
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;

Thank you

Posted: Fri Jun 16, 2006 10:37 am
by 8123141
Thank you!

It works fine here now as welL!