private void PlotVerticalLinesYearsIntoPlotView(List <KeyValuePair <int, int> > YearIndexList) { // Get Y maximum and minimum double _Ymin = MainPlotModel.Axes[1].ActualMinimum; double _Ymax = MainPlotModel.Axes[1].ActualMaximum; // These values are not always updated, so the values are hardcoded big just in case if (_isAxisChanging) { _Ymin = -10000000; _Ymax = 10000000; } // Create annotations for year foreach (KeyValuePair <int, int> item in YearIndexList) { LineAnnotation annotation = new LineAnnotation(); annotation.Color = OxyColors.Red; annotation.MinimumY = _Ymin; annotation.MaximumY = _Ymax; annotation.X = item.Key; annotation.LineStyle = LineStyle.Solid; annotation.Type = LineAnnotationType.Vertical; annotation.Text = item.Value.ToString(); annotation.TextColor = OxyColors.LightSteelBlue; MainPlotModel.Annotations.Add(annotation); } HistoricDataPlotView.InvalidatePlot(true); _isAxisChanging = false; }
private void ResetSecondarySeries() { _plotPointsSerieSecondary.Clear(); MainPlotModel.Axes[2].Reset(); HistoricDataPlotView.InvalidatePlot(true); MainPlotModel.Series.RemoveAt(1); _isSecondaryDataLoaded = false; }
/// <summary> /// Context menu pops up when right click is made /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HistoricDataPlotView_MouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { Point click_point = HistoricDataPlotView.PointToScreen(e.Location); SecondaryAxisContextMenuStrip.Show(click_point); } }
private void ResetSeries() { // Clear plot points serie _plotPointsSerie.Clear(); _plotPointsSerieSecondary.Clear(); //TLE_individualSat_ListProcessed.Clear(); repeated_data = 0; // Clear series and chartareas from historic plot MainPlotModel.Series.Clear(); MainPlotModel.Annotations.Clear(); MainPlotModel.Axes[0].Reset(); MainPlotModel.Axes[1].Reset(); MainPlotModel.Axes[2].Reset(); HistoricDataPlotView.InvalidatePlot(true); }
private void PlotDataIntoPlotView() { LineSeries serie = new LineSeries(); serie.MarkerSize = 2; serie.MarkerFill = Color.LightBlue.ToOxyColor(); serie.MarkerType = MarkerType.Circle; serie.LineStyle = LineStyle.Solid; serie.Color = Color.White.ToOxyColor(); serie.Smooth = true; foreach (var item in _plotPointsSerie) { DataPoint point = new DataPoint(item.X, item.Y); serie.Points.Add(point); } MainPlotModel.Series.Add(serie); HistoricDataPlotView.InvalidatePlot(true); }
private void PlotSecondaryDataIntoView() { LineSeries serieSecondary = new LineSeries(); serieSecondary.MarkerSize = 2; serieSecondary.LineStyle = LineStyle.Solid; serieSecondary.MarkerFill = Color.LightBlue.ToOxyColor(); serieSecondary.Color = Color.GreenYellow.ToOxyColor(); serieSecondary.Smooth = true; serieSecondary.MarkerType = MarkerType.Diamond; foreach (var item in _plotPointsSerieSecondary) { DataPoint point = new DataPoint(item.X, item.Y); serieSecondary.Points.Add(point); } serieSecondary.YAxisKey = "secondary"; MainPlotModel.Series.Add(serieSecondary); HistoricDataPlotView.InvalidatePlot(true); }