using System; using System.Collections.Generic; using System.Collections.ObjectModel; using OxyPlot; using OxyPlot.Series; namespace Core.Components.OxyPlot.Data { /// /// This class represents data which is represented as an area on. /// public class AreaData : DataSeries { /// /// Creates a new instance of . /// /// A of which represents points /// which when connected form an area. /// Thrown when is null. public AreaData(IEnumerable> points) { var series = new AreaSeries(); if (points == null) { throw new ArgumentNullException("points", "A point collection is required when creating ChartData."); } foreach (var p in points) { series.Points.Add(TupleToDataPoint(p)); } if (series.Points.Count > 0) { series.Points2.Add(series.Points[0]); } Series = series; } } }