Under review

Access data points.

Paul Mankowski 6 year бұрын updated by anonymous 6 year бұрын 5
All I am trying to do is to export my data points. I have 4 "detectors". Please help. This is not an example of my attempts to do so but shows how I am adding data. I would like to export to csv in the long run but I can handle that. I just need the raw data points.

public void UpdateModel()
List<Measurement> measurements = Data.GetUpdateData(lastUpdate);
var dataPerDetector = measurements.GroupBy(m => m.DetectorId).OrderBy(m => m.Key).ToList();

foreach (var data in dataPerDetector)
      var lineSerie = PlotModel.Series[data.Key] as LineSeries;
      if (lineSerie != null)
             .ForEach(d => lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(d.DateTime), d.Value)));
var x = lineSerie.Points.ToString();

lastUpdate = DateTime.Now;