Page 1 of 1

Grid for surface series

Posted: Fri Mar 20, 2009 9:08 am
by 13045625
If I try the following for a surface series (or colorgrid)

Code: Select all

            Random y = new Random();
            double[] dX = new double[36];
            double[] dY = new double[36];
            double[] dZ = new double[36];
            int iCount = 0;

            for (int i = 0; i < 6; ++i)
            {
                for (int j = 0; j < 6; ++j)
                {
                    dX[iCount] = i;
                    dZ[iCount] = j;
                    dY[iCount] = y.Next(100);
                    ++iCount;
                 }
            }
            _serSurface.Add(dX, dY, dZ);
Then the grid displays from 0 to 5. In your example using the same code

Welcome !\Chart styles\Extended\All 3D Series\Add Arrays method

Then you show the grid extending from 0 to 6. Is there a setting that I can change to get the behaviour shown in your example? Ideally each of the values that I am setting is the value at a pixel rather than at a point on the grid. Maybe for this I need to use the tower series?

regards

jenb[/quote]

Posted: Fri Mar 20, 2009 11:05 am
by yeray
Hi jenb,

There are basically two differences between Surface series and ColorGrid series:

1. To draw one cell, the surfaces need 4 points (x, z coordinates), one for each corner of the cell. And with a ColorGrid each point is a cell.

2. ColorGrids are planar while Surfaces have volume. The value of the ColorGrid's points determine the cell color. And the values in the surfaces' points determine the "altitude" in which the point (cell corner) will be drawn.

Then if what you want is to set a different altitude for each cell, and not to have slopes, yes, I think that Tower series would fit better your wishes.