first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.RadarChart.Axis;
public class AngleLines
{
/// <summary>
/// Gets or sets the value indicating whether the angle line is displayed or not.
/// </summary>
public bool Display { get; set; } = true;
/// <summary>
/// Gets or sets the color of the angled lines.
/// <para>See <see cref="ColorUtil"/> for working with colors.</para>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Color { get; set; }
/// <summary>
/// Gets or sets the width of the angled lines.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? LineWidth { get; set; }
/// <summary>
/// Gets or sets the length and spacing of dashes of the angled lines.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int[]? BorderDash { get; set; }
/// <summary>
/// Gets or sets the offset for line dashes.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? BorderDashOffset { get; set; }
}

View File

@@ -0,0 +1,90 @@
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; }
}

View File

@@ -0,0 +1,47 @@
using RobotNet.WebApp.Charts.Models.Common;
namespace RobotNet.WebApp.Charts.Models.RadarChart.Axis;
public class PointLabels
{
/// <summary>
/// Gets or sets the font color for a point label.
/// <para>See <see cref="ColorUtil"/> for working with colors.</para>
/// </summary>
public string? Color { get; set; }
/// <summary>
/// If true, point labels are shown. When display: 'auto', the label is hidden if it overlaps with another label
/// </summary>
public bool Display { get; set; }
/// <summary>
/// Background color of the point label.
/// </summary>
public string? BackdropColor { get; set; }
/// <summary>
/// Border radius of the point label
/// </summary>
public double? BorderRadius { get; set; }
/// <summary>
/// Padding of label backdrop.
/// </summary>
public ChartPadding? BackdropPadding { get; set; }
/// <summary>
/// Padding between chart and point labels.
/// </summary>
public ChartPadding? Padding { get; set; }
/// <summary>
/// Font of the point label
/// </summary>
public ChartFont? Font { get; set; }
/// <summary>
/// If true, point labels are centered.
/// </summary>
public bool? CenterPointLabels { get; set; }
}

View File

@@ -0,0 +1,41 @@
using RobotNet.WebApp.Charts.Models.BarChart.Axes;
using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.RadarChart.Axis;
public class RadarAxis : ChartAxes
{
/// <summary>
/// Gets or sets the angle lines configuration.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public AngleLines? AngleLines { get; set; }
/// <summary>
/// Gets or sets the grid lines configuration.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GridLines? GridLines { get; set; }
/// <summary>
/// Gets or sets the point labels configuration.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PointLabels? PointLabels { get; set; }
/// <summary>
/// Gets or sets the ticks configuration.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public new RadialTicks? Ticks { get; set; }
/// <summary>
/// Whether to animate scaling the chart from the centre
/// </summary>
public bool Animate { get; set; } = true;
/// <summary>
/// Starting angle of the scale. In degrees, 0 is at top
/// </summary>
public double StartAngle { get; set; }
}

View File

@@ -0,0 +1,6 @@
namespace RobotNet.WebApp.Charts.Models.RadarChart.Axis;
public class RadarScale
{
public RadarAxis X { get; set; } = new();
}

View File

@@ -0,0 +1,67 @@
using RobotNet.WebApp.Charts.Models.BarChart.Axes;
using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.RadarChart.Axis;
public class RadialTicks : ChartAxesTicks
{
/// <summary>
/// Gets or sets the horizontal padding of label backdrop.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? BackdropPaddingX { get; set; }
/// <summary>
/// Gets or sets the vertical padding of label backdrop.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? BackdropPaddingY { get; set; }
/// <summary>
/// Gets or sets the value indicating whether the scale will include 0 if it is not already included.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? BeginAtZero { get; set; }
/// <summary>
/// Gets or sets the user defined minimum number for the scale, overrides minimum value from data.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? Min { get; set; }
/// <summary>
/// Gets or sets the user defined maximum number for the scale, overrides minimum value from data.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? Max { get; set; }
/// <summary>
/// Gets or sets the maximum number of ticks and gridlines to show.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? MaxTicksLimit { get; set; }
/// <summary>
/// If defined and <see cref="StepSize"/> is not specified, the step size will be rounded to this many decimal places.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Precision { get; set; }
/// <summary>
/// Gets or sets the user defined fixed step size for the scale.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? StepSize { get; set; }
/// <summary>
/// Gets or sets the adjustment used when calculating the maximum data value.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? SuggestedMax { get; set; }
/// <summary>
/// Gets or sets the adjustment used when calculating the minimum data value.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? SuggestedMin { get; set; }
}