0
Under review

Access data points.

Paul Mankowski 4 years ago • updated by anonymous 4 years ago 5
Hello,
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)
      {
      data.ToList()
             .ForEach(d => lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(d.DateTime), d.Value)));
       }
var x = lineSerie.Points.ToString();
}

lastUpdate = DateTime.Now;
}
Nevermind:
var x = PlotModel.Series[2] as LineSeries;
var y = x.Points[0];
Under review
There is also an `ActualPoints` property that I recommend to use!