Skip to content

Commit bbed3f8

Browse files
committed
Enhance BarChartOptions with new configuration properties
The `BarChartOptions` class has been updated to include several new properties: `IndexAxis`, `Interaction`, `Layout`, `Plugins`, `Scales`, and `AdditionalAttributes`. Each property is equipped with versioning, default values, and descriptions to improve the configuration options for bar charts, offering greater flexibility and control over their appearance and behavior. The `AdditionalAttributes` property allows for extra attributes to be applied to the component, enhancing customization capabilities. NOTE: This commit message is auto-generated using GitHub Copilot.
1 parent 97175a7 commit bbed3f8

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

BlazorExpress.ChartJS/Models/ChartOptions/BarChartOptions.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public class BarChartOptions : ChartOptions
2222
/// Default value is <see langword="null"/>.
2323
/// </remarks>
2424
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
25+
[AddedVersion("1.0.0")]
26+
[DefaultValue(null)]
27+
[Description("Gets or sets the base axis of the chart. Use 'x' for vertical charts and 'y' for horizontal charts. Supported values are 'x' and 'y'.")]
2528
public string? IndexAxis { get; set; }
2629

2730
/// <summary>
@@ -30,6 +33,8 @@ public class BarChartOptions : ChartOptions
3033
/// See <see href="https://www.chartjs.org/docs/latest/configuration/interactions.html" /> for more details.
3134
/// </para>
3235
/// </summary>
36+
[AddedVersion("1.0.0")]
37+
[Description("Gets or sets the interaction options for the bar chart.")]
3338
public Interaction Interaction { get; set; } = new();
3439

3540
/// <summary>
@@ -38,6 +43,8 @@ public class BarChartOptions : ChartOptions
3843
/// See <see href="https://www.chartjs.org/docs/latest/configuration/layout.html" /> for more details.
3944
/// </para>
4045
/// </summary>
46+
[AddedVersion("1.0.0")]
47+
[Description("Gets or sets the layout options for the bar chart.")]
4148
public ChartLayout Layout { get; set; } = new();
4249

4350
/// <summary>
@@ -46,6 +53,8 @@ public class BarChartOptions : ChartOptions
4653
/// See <see href="https://www.chartjs.org/docs/latest/configuration/plugins.html" /> for more details.
4754
/// </para>
4855
/// </summary>
56+
[AddedVersion("1.0.0")]
57+
[Description("Gets or sets the plugins configuration for the bar chart.")]
4958
public BarChartPlugins Plugins { get; set; } = new();
5059

5160
/// <summary>
@@ -54,8 +63,19 @@ public class BarChartOptions : ChartOptions
5463
/// See <see href="https://www.chartjs.org/docs/latest/axes/" /> for more details.
5564
/// </para>
5665
/// </summary>
66+
[AddedVersion("1.0.0")]
67+
[Description("Gets or sets the scales configuration for the bar chart.")]
5768
public Scales Scales { get; set; } = new();
5869

70+
/// <summary>
71+
/// Gets or sets additional attributes that will be applied to the component.
72+
/// </summary>
73+
[AddedVersion("1.0.0")]
74+
[DefaultValue(null)]
75+
[Description("Gets or sets additional attributes that will be applied to the component.")]
76+
[Parameter(CaptureUnmatchedValues = true)]
77+
public Dictionary<string, object>? AdditionalAttributes { get; set; }
78+
5979
#endregion
6080

6181
//tooltips -> mode, intersect

0 commit comments

Comments
 (0)