RobotNet/RobotNet.WebApp/Charts/Models/RadarChart/Axis/GridLines.cs
2025-10-15 15:15:53 +07:00

91 lines
3.4 KiB
C#

using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.RadarChart.Axis;
public class GridLines
{
/// <summary>
/// If false, do not display grid lines for this axis.
/// </summary>
public bool Display { get; set; } = true;
/// <summary>
/// If true, gridlines are circular (on radar chart only).
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Circular { get; set; }
/// <summary>
/// The color of the grid lines. If specified as an array, the first color applies to the first grid line, the second to the second grid line and so on.
/// <para>See <see cref="ColorUtil"/> for working with colors.</para>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Color { get; set; }
/// <summary>
/// Length and spacing of dashes on grid lines
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double[]? BorderDash { get; set; }
/// <summary>
/// Stroke width of grid lines.
/// </summary>
public double LineWidth { get; set; } = 1;
/// <summary>
/// If true, draw border at the edge between the axis and the chart area.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? DrawBorder { get; set; }
/// <summary>
/// If true, draw lines on the chart area inside the axis lines. This is useful when there are multiple axes and you need to control which grid lines are drawn.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? DrawOnChartArea { get; set; }
/// <summary>
/// If true, draw lines beside the ticks in the axis area beside the chart.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? DrawTicks { get; set; }
/// <summary>
/// Length in pixels that the grid lines will draw into the axis area.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? TickMarkLength { get; set; }
/// <summary>
/// Stroke width of the grid line for the first index (index 0).
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? ZeroLineWidth { get; set; }
/// <summary>
/// Stroke color of the grid line for the first index (index 0).
/// <para>See <see cref="ColorUtil"/> for working with colors.</para>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ZeroLineColor { get; set; }
/// <summary>
/// Length and spacing of dashes of the grid line for the first index (index 0).
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double[]? ZeroLineBorderDash { get; set; }
/// <summary>
/// Offset for line dashes of the grid line for the first index (index 0).
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? ZeroLineBorderDashOffset { get; set; }
/// <summary>
/// If true, grid lines will be shifted to be between labels. This is set to true for a category scale in a bar chart by default.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? OffsetGridLines { get; set; }
}