Skip to content

Commit 1fb7444

Browse files
committed
Enhance ChartOptions and LineChartOptions classes
Updated the `ChartOptions` class to provide a clearer description for the `Locale` property and changed its default value to a descriptive string. Added new properties to the `LineChartOptions` class: `IndexAxis`, `Interaction`, `Layout`, `Plugins`, and `Scales`, each with detailed descriptions, default values, and version annotations. These improvements enhance documentation and expand configuration options for users. NOTE: This commit message is auto-generated using GitHub Copilot.
1 parent 1feb905 commit 1fb7444

2 files changed

Lines changed: 34 additions & 3 deletions

File tree

BlazorExpress.ChartJS/Models/ChartOptions/ChartOptions.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ public class ChartOptions : IChartOptions
1818
/// <summary>
1919
/// Gets or sets the locale for the chart.
2020
/// <para>
21-
/// Default value is <see langword="null" />.
21+
/// By default, the chart is using the default locale of the platform which is running on.
2222
/// </para>
23+
/// <see href="https://www.chartjs.org/docs/latest/configuration/locale.html" />
2324
/// </summary>
2425
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
2526
[AddedVersion("1.0.0")]
26-
[DefaultValue(null)]
27+
[DefaultValue("By default, the chart is using the default locale of the platform which is running on.")]
2728
[Description("Gets or sets the locale for the chart.")]
28-
//[ParameterTypeName("string?")]
29+
[ParameterTypeName("string?")]
2930
[Parameter]
3031
public string? Locale { get; set; }
3132

BlazorExpress.ChartJS/Models/ChartOptions/LineChartOptions.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,45 @@ public class LineChartOptions : ChartOptions
1414
/// <remarks>
1515
/// Default value is <see langword="null"/>.
1616
/// </remarks>
17+
[AddedVersion("1.0.0")]
18+
[DefaultValue(null)]
19+
[Description("The base axis of the dataset. 'x' for horizontal lines and 'y' for vertical lines.")]
20+
[ParameterTypeName("string?")]
1721
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
1822
public string? IndexAxis { get; set; }
1923

24+
/// <summary>
25+
/// Gets or sets the interaction options for the chart.
26+
/// </summary>
27+
[AddedVersion("1.0.0")]
28+
[DefaultValue("new()")]
29+
[Description("Gets or sets the interaction options for the chart.")]
2030
public Interaction Interaction { get; set; } = new();
2131

32+
/// <summary>
33+
/// Gets or sets the layout configuration for the chart.
34+
/// </summary>
35+
[AddedVersion("1.0.0")]
36+
[DefaultValue("new()")]
37+
[Description("Gets or sets the layout configuration for the chart.")]
38+
[ParameterTypeName("ChartLayout")]
2239
public ChartLayout Layout { get; set; } = new();
2340

41+
/// <summary>
42+
/// Gets or sets the collection of plugins associated with the line chart.
43+
/// </summary>
44+
[AddedVersion("1.0.0")]
45+
[DefaultValue("new()")]
46+
[Description("Gets or sets the collection of plugins associated with the line chart.")]
47+
[ParameterTypeName("LineChartPlugins")]
2448
public LineChartPlugins Plugins { get; set; } = new();
2549

50+
/// <summary>
51+
/// Gets or sets the collection of scales used for measurement or calibration.
52+
/// </summary>
53+
[AddedVersion("1.0.0")]
54+
[DefaultValue("new()")]
55+
[Description("Gets or sets the collection of scales used for measurement or calibration.")]
2656
public Scales Scales { get; set; } = new();
2757

2858
#endregion

0 commit comments

Comments
 (0)