Group: Forum Members
Last Active: 9 Years Ago
Posts: 26,
Visits: 28
|
Hi Milen,
Of course. Thank you!
Best regards, Brian
|
Group: Nevron Team
Last Active: 14 Years Ago
Posts: 48,
Visits: 1
|
Hi Brian,
Just call
nChartControl1.Refresh();
instead of
nChartControl1.Update();
Best Regards, Milen
|
Group: Forum Members
Last Active: 9 Years Ago
Posts: 26,
Visits: 28
|
Hello Nevron,
I'm attempting to graph various sets of 3D data using the NGridSurfaceSeries. Following the example from NGridSurfaceUC.cs, I can display an initial set of data, but if I attempt to change the values of that series later, the display doesn't update. I've checked the data for the series after the change, and it does contain the new data, but the display doesn't reflect the change.
I've also tried deleting the initial surface, then adding it back. I also tried not creating an inital surface, and creating the first surface from the button click.
Can you tell me what I may be doing wrong?
Thanks, Brian Warren
Called from Form_Load:
private void InitializeChart() { int GridSizeX = (int)((_FirstParameterStop - _FirstParameterStart + 1) / _FirstParameterIncrement); int GridSizeY = (int)((_SecondParameterStop - _SecondParameterStart + 1) / _SecondParameterIncrement);
NChart chart = nChartControl1.Charts[0]; chart.Enable3D = true;
nChartControl1.Settings.ShapeRenderingMode = ShapeRenderingMode.None; nChartControl1.Controller.Selection.Add(chart); nChartControl1.Controller.Tools.Add(new NTrackballTool());
// setup chart chart.Width = 60.0f; chart.Depth = 60.0f; chart.Height = 25.0f; chart.Projection.SetPredefinedProjection(PredefinedProjection.PerspectiveTilted); chart.LightModel.SetPredefinedLightModel(PredefinedLightModel.ShinyTopLeft);
// setup axes NOrdinalScaleConfigurator ordinalScale = (NOrdinalScaleConfigurator)chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator; ordinalScale.MajorGridStyle.SetShowAtWall(ChartWallType.Floor, true); ordinalScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); ordinalScale.DisplayDataPointsBetweenTicks = false; ordinalScale.Title.Text = _FirstParameterName;
ordinalScale = (NOrdinalScaleConfigurator)chart.Axis(StandardAxis.Depth).ScaleConfigurator; ordinalScale.MajorGridStyle.SetShowAtWall(ChartWallType.Floor, true); ordinalScale.MajorGridStyle.SetShowAtWall(ChartWallType.Left, true); ordinalScale.DisplayDataPointsBetweenTicks = false; ordinalScale.Title.Text = _SecondParameterName;
// add the surface series NGridSurfaceSeries surface = (NGridSurfaceSeries)chart.Series.Add(SeriesType.GridSurface); surface.Name = "Surface"; surface.Legend.Mode = SeriesLegendMode.SeriesLogic; surface.PositionValue = 10.0; surface.Data.SetGridSize(GridSizeX, GridSizeY); surface.SyncPaletteWithAxisScale = false; surface.PaletteSteps = 8; surface.ValueFormatter.FormatSpecifier = "0.00"; // Get this from configuration file if needed surface.FillStyle = new NColorFillStyle(Color.YellowGreen);
surface.UseCustomXOriginAndStep = true; surface.UseCustomZOriginAndStep = true; surface.OriginX = _FirstParameterStart; surface.StepX = _FirstParameterIncrement; surface.OriginZ = _SecondParameterStart; surface.StepZ = _SecondParameterIncrement;
FillData(surface); // For test
// Chart settings surface.FillMode = SurfaceFillMode.Zone; surface.ShadingMode = ShadingMode.Smooth;
surface.FrameMode = SurfaceFrameMode.Contour; surface.FrameColorMode = SurfaceFrameColorMode.Uniform;
surface.SmoothPalette = false; surface.PaletteSteps = 8; surface.Legend.Format = " - "; surface.DrawFlat = false; }
Called from Button1_Click:
private void PerformOpenFile() { NChart chart = nChartControl1.Charts[0]; NGridSurfaceSeries surface = (NGridSurfaceSeries)chart.Series[0]; FillData2(surface); // A different fill routine for test nChartControl1.Update(); return; }
|