using RobotNet.WebApp.Charts.Enums;
using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.Common.Elements;
public class Line
{
///
/// Bézier curve tension (0 for no Bézier curves).
///
public int Tension { get; set; }
///
/// Line fill color.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BackgroundColor { get; set; }
///
/// Line stroke width.
///
public int BorderWidth { get; set; } = 1;
///
/// Line stroke color.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BorderColor { get; set; }
///
/// Line cap style.
///
public string BorderCapStyle { get; set; } = "butt";
///
/// Line dash.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int[]? BorderDash { get; set; }
///
/// Line dash offset.
///
public double BorderDashOffset { get; set; }
///
/// Line join style.
///
public BorderJoinStyle BorderJoinStyle { get; set; } = BorderJoinStyle.Miter;
///
/// if true to keep Bézier control inside the chart, false for no restriction.
///
public bool CapBezierPoints { get; set; } = true;
///
/// Interpolation mode to apply.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? CubicInterpolationMode { get; set; }
///
/// How to fill the area under the line.
///
public bool Fill { get; set; }
///
/// if true to show the line as a stepped line (tension will be ignored).
///
public bool Stepped { get; set; }
}