RobotNet/RobotNet.WebApp/Charts/Models/BubbleChart/BubblePoint.cs
2025-10-15 15:15:53 +07:00

27 lines
793 B
C#

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;
}