Hello! I have problem with drawing mesh surface: it shifts on Z scale for Z size of grid. What I'm doing wrong?
Example is in attachment, as you can see, surface shifted in Z direction. Size of gridX = 16, gridZ = 768.
My source code is
NGridSurfaceSeries surface = (NGridSurfaceSeries)nChartDin.Charts[7].Series.Add(SeriesType.GridSurface);
surface.Name = "Surface";
surface.Legend.Mode = SeriesLegendMode.SeriesLogic;
surface.Legend.TextStyle.FontStyle.EmSize = new NLength(8, NGraphicsUnit.Point);
surface.PositionValue = 0;
surface.Data.SetGridSize(16, 768); //
surface.SmoothPalette = true;
surface.SyncPaletteWithAxisScale = false;
surface.PaletteSteps = 8;
surface.ValueFormatter.FormatSpecifier = "0.0";
// setup X axis
NLinearScaleConfigurator scaleX = new NLinearScaleConfigurator();
scaleX.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Floor, ChartWallType.Back, ChartWallType.Front };
scaleX.RoundToTickMin = false;
scaleX.RoundToTickMax = false;
nChartDin.Charts[7].Axis(StandardAxis.PrimaryX).ScaleConfigurator = scaleX;
// setup Z axis
NLinearScaleConfigurator scaleZ = new NLinearScaleConfigurator();
scaleZ.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Floor, ChartWallType.Left, ChartWallType.Front };
scaleZ.RoundToTickMin = false;
scaleZ.RoundToTickMax = false;
nChartDin.Charts[7].Axis(StandardAxis.Depth).ScaleConfigurator = scaleZ;
nChartDin.Charts[7].Enable3D = true;
nChartDin.Charts[7].Width = 50;
nChartDin.Charts[7].Depth = 50;
nChartDin.Charts[7].Height = 50;
nChartDin.Charts[7].Projection.Elevation = 28;
nChartDin.Charts[7].Projection.Rotation = -18;
nChartDin.Charts[7].LightModel.SetPredefinedLightModel(PredefinedLightModel.ShinyTopLeft);
nChartDin.Charts[7].Projection.Type = ProjectionType.Perspective;
nChartDin.Charts[7].Visible = false;
for (int i = 0; i < numDinSamples - numSamples; i++)
{
for (int m = 0; m < 16; m++)
{
surface.Data.SetValue(m, i, dataY[m]);
}
}