using RobotNet.WebApp.Charts.Models.Common.Dataset; using RobotNet.WebApp.Charts.Enums; using System.Text.Json.Serialization; namespace RobotNet.WebApp.Charts.Models.BarChart; public class BarChartDataset : ChartDataset { /// /// Percent (0-1) of the available width each bar should be within the category width. /// 1.0 will take the whole category width and put the bars right next to each other. /// /// /// Default value is 0.9. /// public double BarPercentage { get; set; } = 0.9; /// /// It is applied to the width of each bar, in pixels. /// When this is enforced, barPercentage and categoryPercentage are ignored. /// /// /// Default value is . /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? BarThickness { get; set; } /// /// This setting is used to avoid drawing the bar stroke at the base of the fill, or disable the border radius. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public BorderSkipped? BorderSkipped { get; set; } /// /// Percent (0-1) of the available width each category should be within the sample width. /// /// /// Default value is 0.8. /// public double CategoryPercentage { get; set; } = 0.8; /// /// Should the bars be grouped on index axis. /// When , all the datasets at same index value will be placed next to each other centering on that /// index value. /// When , each bar is placed on its actual index-axis value. /// /// /// Default value is . /// public bool Grouped { get; set; } = true; /// /// The bar border radius when hovered (in pixels). /// /// /// Default value is 0. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? HoverBorderRadius { get; set; } /// /// The base axis of the chart. 'x' for vertical charts and 'y' for horizontal charts. /// Supported values are 'x' and 'y'. /// /// /// Default value is . /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public IndexAxis? IndexAxis { get; set; } /// /// Set this to ensure that bars are not sized thicker than this. /// /// /// Default value is . /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? MaxBarThickness { get; set; } /// /// Set this to ensure that bars have a minimum length in pixels. /// /// /// Default value is . /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public double? MinBarLength { get; set; } public PointStyle PointStyle { get; set; } = PointStyle.Circle; /// /// If , null or undefined values will not be used for spacing calculations when determining bar /// size. /// /// /// Default value is . /// public bool SkipNull { get; set; } /// /// The ID of the x axis to plot this dataset on. /// /// /// Default value is first x axis. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? XAxisID { get; set; } /// /// The ID of the y axis to plot this dataset on. /// /// /// Default value is first y axis. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? YAxisID { get; set; } }