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,18 @@
using RobotNet.WebApp.Charts.Models.Common.Dataset;
using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.BubbleChart;
public class BubbleChartDataset : ChartDataset<BubblePoint>
{
public bool DrawActiveElementsOnTop { get; set; } = true;
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? HoverRadius { get; set; }
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? HitRadius { get; set; }
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Radius { get; set; }
}

View File

@@ -0,0 +1,7 @@
using RobotNet.WebApp.Charts.Models.Common.Dataset;
namespace RobotNet.WebApp.Charts.Models.BubbleChart;
public class BubbleChartDatasetData(string? datasetLabel, BubblePoint data, string? backgroundColor) : ChartDatasetData(datasetLabel, data, backgroundColor)
{
}

View File

@@ -0,0 +1,21 @@
using RobotNet.WebApp.Charts.Enums;
using RobotNet.WebApp.Charts.Models.BarChart;
using RobotNet.WebApp.Charts.Models.Common;
namespace RobotNet.WebApp.Charts.Models.BubbleChart;
public class BubbleChartOptions : ChartOptions
{
/// <summary>
/// The base axis of the chart. 'x' for vertical charts and 'y' for horizontal charts.
/// Supported values are 'x' and 'y'.
/// </summary>
/// <remarks>
/// Default value is <see langword="null"/>.
/// </remarks>
public IndexAxis IndexAxis { get; set; } = IndexAxis.X;
public BubbleChartPlugins Plugins { get; set; } = new();
public BarScales Scales { get; set; } = new();
}

View File

@@ -0,0 +1,7 @@
using RobotNet.WebApp.Charts.Models.Common.Plugins;
namespace RobotNet.WebApp.Charts.Models.BubbleChart;
public class BubbleChartPlugins : ChartPlugins
{
}

View File

@@ -0,0 +1,26 @@
using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.BubbleChart;
public class BubblePoint(double x, double y, double r)
{
/// <summary>
/// Gets the X-value of this <see cref="BubblePoint"/>.
/// </summary>
public double X { get; } = x;
/// <summary>
/// Gets the Y-value of this <see cref="BubblePoint"/>.
/// </summary>
public double Y { get; } = y;
/// <summary>
/// Gets the radius of this <see cref="BubblePoint"/> in pixels. Will be serialized as 'r'.
/// <para>
/// Important: this property is not scaled by the chart,
/// it is the raw radius in pixels of the bubble that is drawn on the canvas.
/// </para>
/// </summary>
[JsonPropertyName("r")]
public double Radius { get; } = r;
}