Page 1 of 1

Contour / Surface with undefined data

Posted: Wed Jun 29, 2005 7:54 pm
by 8578285
Hi

I have to display Contout/Surface chart with some undefined data
(number of points in data grid are not defined) for example limited number of points for surface defintion

The problem is that contour/surface chart hides the data around the undefined points and in case of limited and random points TeeChart does not display the surface at all.

Regards,
Arie

Posted: Thu Jun 30, 2005 11:04 am
by narcis
Hi Arie,

Please notice that ColorGrid and Surface series need to have "matrix" structure, X and Z values defining the rows and columns and Y values determining cells value. It should be able to be populated using a nested for loop as shown below. If you don't want some cells not being visible you can set it to Color.Transparent as shown in the example.

Code: Select all

			for (int x=0; x<10; ++x)
				for (int z=0; z<10; ++z)
					if (x % 2 == 0)
						surface1.Add(x,x*z,z,Color.Transparent);
					else
						surface1.Add(x,x*z,z);
If X and Z values are not equidistant then you should use:

Code: Select all

			surface1.IrregularGrid=true;