private void UpdateGraph() { // Update Axis of MyModel string selectItem = GraphVar.SelectedItem.ToString(); var axisSet = gc.GetAxisTitle(selectItem); mvm.UpdateAxis(axisSet); // DataPoint update mvm.InitializeSeries(); var listDic = post.ListDic; var addListX = listDic[axisSet.AxisX]; // Set DataPoint to MyModel foreach (var yItem in axisSet.AxisY.Split(',')) { var addListY = listDic[yItem]; var addSeries = post.ToDataSet(addListX, addListY); mvm.AddMainSeries(addSeries, yItem); } // Update Plotmodel PlotWindow.Model = mvm.MyModel; PlotWindow.InvalidatePlot(true); }
private void OpenPlotWindow(object sender, Avalonia.Interactivity.RoutedEventArgs e) { var viewModel = (MainWindowViewModel)((Window)this.VisualRoot).DataContext; var window = new PlotWindow(viewModel); window.Show((Window)this.VisualRoot); }
public static void OutPlot(string msg, IEnumerable <PlotInfo> list, IEnumerable <double> guideLines = null) { if (list is null) { return; } PlotWindow.Create(msg, list, guideLines); }
public void Execute(object parameter) { this.BeeAlgorithm.CreateMethod(); PlotWindow x = new PlotWindow { DataContext = this.BeeAlgorithm }; x.Show(); }
public void Undock() { App.Current.Dispatcher.Invoke(() => { var context = HideCurrent(); if (context != null) { var window = new PlotWindow { DataContext = context }; window.Show(); } }); }
public void UndockAny(Object obj) { var context = ConvertToViewModel(obj); if (context != null) { App.Current.Dispatcher.Invoke(() => { if (Object.ReferenceEquals(context, _contexts.LastOrDefault())) { Undock(); } else if (_contexts.Remove(context)) { var window = new PlotWindow { DataContext = context }; window.Show(); } }); } }
private void BtnTestPlot_Click(object sender, RoutedEventArgs e) { PlotWindow plot = new PlotWindow(selectedStat); plot.Show(); }