using RobotNet.WebApp.Charts.Enums;
using System.Text.Json.Serialization;

namespace RobotNet.WebApp.Charts.Models.Common.Dataset;

public class ChartDatasetDataLabels
{
    public DataLabelsAlignment Align { get; set; } = DataLabelsAlignment.Center;
    public DataLabelsAnchoring Anchor { get; set; } = DataLabelsAnchoring.Center;

    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
    public string? BackgroundColor { get; set; }

    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
    public string? Color { get; set; }

    public bool Display { get; set; } = true;

    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
    public ChartFont? Font { get; set; }

    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
    public ChartPadding? Padding { get; set; } = new(6);
}
