using System; using System.Collections.Generic; using System.Linq; namespace Core.Components.Charting.Data { /// /// Abstract class for data with the purpose of becoming visible in charting components. /// public abstract class ChartData { /// /// Creates a new instance of . /// /// An of of the /// in 2D space. /// Thrown when is null. protected ChartData(IEnumerable> points) { if (points == null) { throw new ArgumentNullException("points", "A point collection is required when creating AreaData."); } Points = points.ToArray(); IsVisible = true; } /// /// Gets or sets a value indicating whether the is visible. /// public bool IsVisible { get; set; } /// /// Gets the collection of points in 2D space. /// public IEnumerable> Points { get; private set; } } }