public ChartPlot(string title, VLFBasicData data) { InitializeComponent(); if (data.GetType() == typeof(TiltData)) { plotView1.Model = GraphPaper(title, $"dx: {data.Spacing} m, N {data.Bearing} °E", "Tilt", "%"); AddSeries(data, OxyColors.DarkOrange); Text = $"Tilt [{title}]"; } else { plotView1.Model = GraphPaper(title, $"dx: {data.Spacing} m, N {data.Bearing} °E", "Fraser Value", "%"); AddSeries(data, OxyColors.MidnightBlue); Text = $"Fraser [{title}]"; } }
private void AddSeries(VLFBasicData data, OxyColor color) { var str = data.GetType() == typeof(TiltData) ? "Tilt (%)" : "Fraser (%)"; var series = new LineSeries { Title = str, MarkerType = MarkerType.Circle, MarkerFill = color, Color = color }; for (var i = 0; i < data.Npts; i++) { series.Points.Add(new DataPoint(data.Distances[i], data.Values[i])); } plotView1.Model.Series.Add(series); }