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

56 lines
1.4 KiB
C#

using RobotNet.WebApp.Charts.Enums;
using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.Common.Elements;
public class Arc
{
/// <summary>
/// Arc angle to cover.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? Angle { get; set; }
/// <summary>
/// Arc fill color.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BackgroundColor { get; set; }
/// <summary>
/// Arc stroke alignment.
/// </summary>
public BorderAlign BorderAlign { get; set; } = BorderAlign.Center;
/// <summary>
/// Arc stroke color.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BorderColor { get; set; }
/// <summary>
/// Arc line dash
/// </summary>
public int[]? BorderDash { get; set; }
/// <summary>
/// Arc line dash offset
/// </summary>
public double BorderDashOffset { get; set; }
/// <summary>
/// Line join style.
/// </summary>
public BorderJoinStyle? BorderJoinStyle { get; set; }
/// <summary>
/// Arc stroke width.
/// </summary>
public int BorderWidth { get; set; } = 2;
/// <summary>
/// By default the Arc is curved. If circular: false the Arc will be flat
/// </summary>
public bool Circular { get; set; } = true;
}