private void gvData_DoubleClick(object sender, EventArgs e) { if (this.gvData.FocusedRowHandle != GridControl.InvalidRowHandle && this.gvData.FocusedColumn != null) { StrategyDataItemInfo info = (StrategyDataItemInfo)this.gvData.FocusedColumn.Tag; if (info.DetailInfo != null) { info = info.DetailInfo; } if (info.Type != DataType.ChartData) { return; } info.Value = gvData.GetFocusedRow(); ChartControl chart = new ChartControl() { Dock = DockStyle.Fill }; chart.BeginInit(); XYDiagram dia = new XYDiagram(); chart.Diagram = dia; StrategyDataVisualiser visualiser = new StrategyDataVisualiser(); XtraTabPage page = new XtraTabPage(); page.Text = info.Name; page.Controls.Add(chart); visualiser.Visualize(info, null, chart); chart.EndInit(); this.tabControl.TabPages.Add(page); } }
private void SimpleGrip_OnHistogramResultPoints(object sender, Infrastructure.FrameCapture.CaptureArgs <List <Point> > e) { chartResLink.Dispatcher.Invoke(() => { chartResLink.BeginInit(); PointsRes = e.Result; chartResLink.EndInit(); }); }
private void UpdateData(ChartControl chart) { chart.BeginInit(); foreach (Series series in chart.Diagram.Series) { series.Points.Clear(); for (int i = 0; i <= 100; i++) { SeriesPoint p = new SeriesPoint(i, rnd.Next(50, 100)); series.Points.Add(p); } } chart.EndInit(); }
public static void init2YData(Chart2YDataVo oDataVo, ChartControl oChart) { oChart.BeginInit(); oChart.DataSource = oDataVo; oChart.EndInit(); }