using RobotNet.WebApp.Charts.Models.Common.Elements; using System.Text.Json.Serialization; namespace RobotNet.WebApp.Charts.Models.Common; public class ChartOptions : IChartOptions { /// /// Gets or sets the locale. /// By default, the chart is using the default locale of the platform which is running on. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Locale { get; set; } /// /// Gets or sets a value indicating whether to maintain the original canvas aspect ratio (width / height) when resizing. /// /// /// Default value is . /// public bool MaintainAspectRatio { get; set; } = true; /// /// Gets or sets a value indicating whether the chart canvas should be resized when its container is. /// /// /// Default value is . /// public bool Responsive { get; set; } /// /// Gets or sets the canvas aspect ratio (i.e. width / height, a value of 1 representing a square canvas). /// Note that this option is ignored if the height is explicitly defined either as attribute (of the canvas) or via the style. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? AspectRatio { get; set; } /// /// Gets or sets the duration in milliseconds it takes to animate to new size after a resize event. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? ResponsiveAnimationDuration { get; set; } /// /// Gets or sets the animation-configuration for this chart. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ChartAnimation? Animation { get; set; } /// /// Gets or sets the layout options for this chart. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ChartLayout? Layout { get; set; } /// /// Gets or sets the Interaction configuration for this chart. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public Interaction? Interaction { get; set; } /// /// Gets or sets the elements options for this chart. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public ChartElements? Elements { get; set; } }