private void AddChart() { chartCanvas.Children.Clear(); cs = new ChartStyle(); ds = new DataSeriesLine3D(); cs.ChartCanvas = this.chartCanvas; cs.GridlinePattern = ChartStyle.GridlinePatternEnum.Solid; cs.Elevation = double.Parse(tbElevation.Text); cs.Azimuth = double.Parse(tbAzimuth.Text); cs.Xmin = -1; cs.Xmax = 1; cs.Ymin = -1; cs.Ymax = 1; cs.Zmin = 0; cs.Zmax = 30; cs.XTick = 0.5; cs.YTick = 0.5; cs.ZTick = 5; cs.Title = "No Title"; cs.AddChartStyle(); ds.LineColor = Brushes.Red; for (int i = 0; i < 300; i++) { double t = 0.1 * i; double x = Math.Exp(-t / 30) * Math.Cos(t); double y = Math.Exp(-t / 30) * Math.Sin(t); double z = t; ds.Point3DList.Add(new Point3D(x, y, z)); } ds.AddLine3D(cs); }
private void AddCoordinateAxes() { chartCanvas.Children.Clear(); cs = new ChartStyle(); cs.ChartCanvas = this.chartCanvas; cs.GridlinePattern = ChartStyle.GridlinePatternEnum.Solid; cs.Elevation = double.Parse(tbElevation.Text); cs.Azimuth = double.Parse(tbAzimuth.Text); cs.AddChartStyle(); }
private void AddChart() { chartCanvas.Children.Clear(); cs = new ChartStyle(); cs.ChartCanvas = this.chartCanvas; cs.GridlinePattern = ChartStyle.GridlinePatternEnum.Solid; cs.Elevation = 30; cs.Azimuth = -37; cs.Title = "No Title"; cs.IsColorBar = true; cs.AddChartStyle(); ds = new DataSeriesSurface(); ds.LineColor = Brushes.Black; Utility.Peak3D(cs, ds); dsc = new DrawSurfaceChart(); dsc.SurfaceChartType = DrawSurfaceChart.SurfaceChartTypeEnum.Surface; dsc.IsColormap = true; dsc.IsHiddenLine = false; //dsc.IsInterp = true; //dsc.NumberInterp = 3; dsc.Colormap.ColormapBrushType = ColormapBrush.ColormapBrushEnum.Jet; dsc.AddSurfaceChart(cs, ds); }