Home Forums WinForms controls Xceed Chart for WinForms Question about SurfaceGrid and populating data

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18714 |

    Hi I went through the documentation on the surface grid and still kind of confused about some thing.

    I have a a sets of datapoints (x,y,z), (x1,y1,z1) that I want to plot on a Grid to make a 3d surface , where the z value will be the elevation. I saw a couple of examples but they all use indexes.
    My values x, y are non-integer.

    So in my code:

    xarray[] is the array of x values.
    yarray[] is the array of y values
    zarray[] is the array of z values

    for ( int i =0 ; i< xarray.Length ; i++)
    {
    for ( int j =0 ; i < yarray.Length ; j++)
    {
    surface.Data.Setvalue ( xarray[i], yarray[j] , zarray[i*xarray.Length + j]);
    }
    }
    it keeps complaining that xarray[i] , yarray[j] are non integer values and should be indexes.

    Can you please point me to the correct direction how I would do something like that?

    Thanks

    Imported from legacy forums. Posted by Spyros (had 2035 views)

    User (Old forums)
    Member
    Post count: 23064

    Basically, a grid surface is used to display elevational data connecting adjacent data-points spaced regularly on the chart’s width- and depth-dimensions. It is like a bar chart, where only Y points are meaningful, X points being sequential (i.e from 1 to n ).

    What you need would likely be a mesh surface grid, which is used to display elevational data connecting adjacent data-points spaced randomly on the chart’s width- and depth-dimensions. Then you can specify your data points, though you still need the XY coordinates on the grid.

    Imported from legacy forums. Posted by André (had 3073 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.