using System;
namespace Spectre.Console
{
///
/// An item that's shown in a bar chart.
///
public sealed class BarChartItem : IBarChartItem
{
///
/// Gets the item label.
///
public string Label { get; }
///
/// Gets the item value.
///
public double Value { get; }
///
/// Gets the item color.
///
public Color? Color { get; }
///
/// Initializes a new instance of the class.
///
/// The item label.
/// The item value.
/// The item color.
public BarChartItem(string label, double value, Color? color = null)
{
Label = label ?? throw new ArgumentNullException(nameof(label));
Value = value;
Color = color;
}
}
}