0
Under review
Access data points.
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()
{
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;
}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;
Customer support service by UserEcho
var x = PlotModel.Series[2] as LineSeries;
var y = x.Points[0];