Group: Forum Members
Last Active: 14 Years Ago
Posts: 1,
Visits: 1
|
Hi, I'm testing Nevron Vision 2009.1 for VS2008.
I'm using the Surface Graph in an ASP .NET webpage but it doesn't work properly. This is my code, the Matrix has values from 1000 to 2000 :
int[] X = { 15, 20, 50, 206, 363, 519, 675, 831, 988, 1144, 1300, 1456, 1612, 2585}; int[] Y = { 15, 20, 50, 200, 350, 500, 650, 800, 950, 1100, 1250, 1400, 1550, 1700, 1850, 2000};
NChart chart =ChartSF.Charts[0]; surface.Data.SetGridSize(3000, 3000);
for (int i = 0; i < 13; i++) { for (int j = 0; j < 15; j++) { surface.Data.SetValue(X[i]], Y[j], Matrix[x, y]); } }
When I launch the web page it's running for a long long long long time and never returns a picture. If I reduce the GridSize to (30,30) and only plot values under 30 it works. Is this control fully operative?
Thanks
|
Group: Nevron Team
Last Active: 14 Years Ago
Posts: 48,
Visits: 1
|
Hi, A grid size of 3000 * 3000 results in a surface with 9000000 data points. The control is not designed to display such amounts of data. Looking at the code it seems that you actually want to display a significantly smaller matrix: 14 * 16 = 224 data points, but you need a grid with custom positions for the X and Z (depth) values. In this case you can use NMeshSurfaceSeries instead of NGridSurfaceSeries. The code that feeds the data will be something like: int[] X = { 15, 20, 50, 206, 363, 519, 675, 831, 988, 1144, 1300, 1456, 1612, 2585 }; int[] Z = { 15, 20, 50, 200, 350, 500, 650, 800, 950, 1100, 1250, 1400, 1550, 1700, 1850, 2000 }; NMeshSurfaceSeries surface = new NMeshSurfaceSeries(); chart.Series.Add(surface); surface.Data.SetGridSize(14, 16); for (int j = 0; j < 16; j++) { for (int i = 0; i < 14; i++) { surface.Data.SetValue(i, j, Matrix[i, j], X[i], Z[j]); } }
I hope this helps. Let me know if you have any questions.
|