RobotNet/RobotNet.WebApp/Charts/Models/Common/Elements/Bar.cs
2025-10-15 15:15:53 +07:00

47 lines
1.3 KiB
C#

using RobotNet.WebApp.Charts.Enums;
using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.Common.Elements;
public class Bar
{
/// <summary>
/// Bar fill color.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BackgroundColor { get; set; }
/// <summary>
/// Bar stroke width.
/// </summary>
public int BorderWidth { get; set; } = 1;
/// <summary>
/// Bar stroke color.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BorderColor { get; set; }
/// <summary>
/// Skipped (excluded) border.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public BorderSkipped? BorderSkipped { get; set; }
/// <summary>
/// The bar border radius (in pixels).
/// </summary>
public int BorderRadius { get; set; }
/// <summary>
/// The amount of pixels to inflate the bar rectangle(s) when drawing.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? InflateAmount { get; set; }
/// <summary>
/// Style of the point for legend.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PointStyle? PointStyle { get; set; }
}