Skip to content

Commit 60f7864

Browse files
committed
Enhance documentation and properties in chart datasets
- Added `<see>` references to data labels configurations for `BarChartDataset`, `DoughnutChartDataset`, `LineChartDataset`, and `PolarAreaChartDataset`. - Improved descriptions for properties in `DoughnutChartDataset`, `PieChartDataset`, and `PolarAreaChartDataset` using bold formatting for supported values. - Introduced new properties `Layout`, `Plugins`, `Interaction`, and `Scales` in `LineChartOptions`, `PieChartOptions`, `PolarAreaChartOptions`, and `ScatterChartOptions` with relevant documentation links. NOTE: This commit message is auto-generated using GitHub Copilot.
1 parent bde3647 commit 60f7864

9 files changed

Lines changed: 185 additions & 55 deletions

File tree

BlazorExpress.ChartJS/Models/ChartDataset/BarChart/BarChartDataset.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public class BarChartDataset : ChartDataset<double?>
119119
/// This property allows customization of data labels, such as their appearance, positioning, and
120120
/// formatting. If not set, the default configuration will be used.
121121
/// </para>
122+
/// <see href="https://chartjs-plugin-datalabels.netlify.app/guide/getting-started.html#configuration" />
122123
/// </summary>
123124
[AddedVersion("1.0.0")]
124125
[DefaultValue("new()")]

BlazorExpress.ChartJS/Models/ChartDataset/DoughnutChart/DoughnutChartDataset.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class DoughnutChartDataset : ChartDataset<double?>
3333
/// </summary>
3434
[AddedVersion("1.0.0")]
3535
[DefaultValue("center")]
36-
[Description("Supported values are 'center' and 'inner'. When 'center' is set, the borders of arcs next to each other will overlap. When 'inner' is set, it is guaranteed that all borders will not overlap.")]
36+
[Description("Supported values are <b>center</b> and <b>inner</b>. When <b>center</b> is set, the borders of arcs next to each other will overlap. When <b>inner</b> is set, it is guaranteed that all borders will not overlap.")]
3737
[ParameterTypeName("List<string>?")]
3838
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
3939
public List<string>? BorderAlign { get; set; } // TODO: change this to enum
@@ -78,14 +78,14 @@ public class DoughnutChartDataset : ChartDataset<double?>
7878

7979
/// <summary>
8080
/// Arc border join style.
81-
/// Supported values are 'round', 'bevel', 'miter'.
81+
/// Supported values are 'round', 'bevel', and 'miter'.
8282
/// <para>
8383
/// Default value is <see langword="null"/>.
8484
/// </para>
8585
/// </summary>
8686
[AddedVersion("1.0.0")]
8787
[DefaultValue(null)]
88-
[Description("Arc border join style. Supported values are 'round', 'bevel', 'miter'.")]
88+
[Description("Arc border join style. Supported values are <b>round</b>, <b>bevel</b>, and <b>miter</b>.")]
8989
[ParameterTypeName("List<string>?")]
9090
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
9191
public List<string>? BorderJoinStyle { get; set; } // TODO: change this to enum
@@ -139,6 +139,7 @@ public class DoughnutChartDataset : ChartDataset<double?>
139139
/// Use this property to customize the display of data labels, such as their font, color,
140140
/// alignment, and visibility, for the doughnut chart dataset.
141141
/// </para>
142+
/// <see href="https://chartjs-plugin-datalabels.netlify.app/guide/getting-started.html#configuration" />
142143
/// </summary>
143144
[AddedVersion("1.0.0")]
144145
[DefaultValue("new()")]
@@ -201,14 +202,14 @@ public class DoughnutChartDataset : ChartDataset<double?>
201202

202203
/// <summary>
203204
/// Arc border join style when hovered.
204-
/// Supported values are 'round', 'bevel', 'miter'.
205+
/// Supported values are 'round', 'bevel', and 'miter'.
205206
/// <para>
206207
/// Default value is <see langword="null"/>.
207208
/// </para>
208209
/// </summary>
209210
[AddedVersion("1.0.0")]
210211
[DefaultValue(null)]
211-
[Description("Arc border join style when hovered. Supported values are 'round', 'bevel', 'miter'.")]
212+
[Description("Arc border join style when hovered. Supported values are <b>round</b>, <b>bevel</b>, and <b>miter</b>.")]
212213
[ParameterTypeName("List<string>?")]
213214
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
214215
public List<string>? HoverBorderJoinStyle { get; set; } // TODO: change this to enum

BlazorExpress.ChartJS/Models/ChartDataset/LineChart/LineChartDataset.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ public LineChartDataset FillToValue(double value)
226226
/// Use this property to customize the display of data labels, such as their position,
227227
/// formatting, and visibility, for the dataset in the line chart.
228228
/// </para>
229+
/// <see href="https://chartjs-plugin-datalabels.netlify.app/guide/getting-started.html#configuration" />
229230
/// </summary>
230231
[AddedVersion("1.0.0")]
231232
[DefaultValue("new()")]

BlazorExpress.ChartJS/Models/ChartDataset/PieChart/PieChartDataset.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public class PieChartDataset : ChartDataset<double?>
7777

7878
/// <summary>
7979
/// Arc border join style.
80-
/// Supported values are 'round', 'bevel', 'miter'.
80+
/// Supported values are 'round', 'bevel', and 'miter'.
8181
/// <para>
8282
/// Default value is <see langword="null"/>.
8383
/// </para>

BlazorExpress.ChartJS/Models/ChartDataset/PolarAreaChart/PolarAreaChartDataset.cs

Lines changed: 113 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,132 +6,198 @@ public class PolarAreaChartDataset : ChartDataset<double?>
66

77
/// <summary>
88
/// Arc background color.
9-
/// </summary>
10-
/// <remarks>
9+
/// <para>
1110
/// Default value is 'rgba(0, 0, 0, 0.1)'.
12-
/// </remarks>
11+
/// </para>
12+
/// </summary>
13+
[AddedVersion("1.0.0")]
14+
[DefaultValue("rgba(0, 0, 0, 0.1)")]
15+
[Description("Arc background color.")]
16+
[ParameterTypeName("List<string>?")]
1317
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
1418
public List<string>? BackgroundColor { get; set; }
1519

1620
/// <summary>
1721
/// Supported values are 'center' and 'inner'.
1822
/// When 'center' is set, the borders of arcs next to each other will overlap.
1923
/// When 'inner' is set, it is guaranteed that all borders will not overlap.
20-
/// </summary>
21-
/// <remarks>
24+
/// <para>
2225
/// Default value is 'center'.
23-
/// </remarks>
26+
/// </para>
27+
/// </summary>
28+
[AddedVersion("1.0.0")]
29+
[DefaultValue("center")]
30+
[Description("Supported values are <b>center</b> and <b>inner</b>. When <b>center</b> is set, the borders of arcs next to each other will overlap. When <b>inner</b> is set, it is guaranteed that all borders will not overlap.")]
31+
[ParameterTypeName("List<string>?")]
2432
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
2533
public List<string>? BorderAlign { get; set; } // TODO: change this to enum
2634

2735
/// <summary>
2836
/// Arc border color.
29-
/// </summary>
30-
/// <remarks>
37+
/// <para>
3138
/// Default value is '#fff'.
32-
/// </remarks>
39+
/// </para>
40+
/// </summary>
41+
[AddedVersion("1.0.0")]
42+
[DefaultValue("#fff")]
43+
[Description("Arc border color.")]
44+
[ParameterTypeName("List<string>?")]
3345
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
3446
public List<string>? BorderColor { get; set; }
3547

3648
/// <summary>
3749
/// Arc border length and spacing of dashes.
38-
/// </summary>
39-
/// <remarks>
50+
/// <para>
4051
/// Default value is <see langword="null"/>.
41-
/// </remarks>
52+
/// </para>
53+
/// </summary>
54+
[AddedVersion("1.0.0")]
55+
[DefaultValue(null)]
56+
[Description("Arc border length and spacing of dashes.")]
57+
[ParameterTypeName("List<double>?")]
4258
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
4359
public List<double>? BorderDash { get; set; }
4460

4561
/// <summary>
4662
/// Arc border offset for line dashes.
47-
/// </summary>
48-
/// <remarks>
63+
/// <para>
4964
/// Default value is 0.0.
50-
/// </remarks>
65+
/// </para>
66+
/// </summary>
67+
[AddedVersion("1.0.0")]
68+
[DefaultValue(0.0)]
69+
[Description("Arc border offset for line dashes.")]
5170
public double BorderDashOffset { get; set; }
5271

5372
/// <summary>
5473
/// Arc border join style.
55-
/// Supported values are 'round', 'bevel', 'miter'.
56-
/// </summary>
57-
/// <remarks>
74+
/// Supported values are 'round', 'bevel', and 'miter'.
75+
/// <para>
5876
/// Default value is <see langword="null"/>.
59-
/// </remarks>
77+
/// </para>
78+
/// </summary>
79+
[AddedVersion("1.0.0")]
80+
[DefaultValue(null)]
81+
[Description("Arc border join style. Supported values are <b>round</b>, <b>bevel</b>, and <b>miter</b>.")]
82+
[ParameterTypeName("List<string>?")]
6083
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
6184
public List<string>? BorderJoinStyle { get; set; } // TODO: change this to enum
6285

6386
/// <summary>
6487
/// Arc border width (in pixels).
65-
/// </summary>
66-
/// <remarks>
88+
/// <para>
6789
/// Default value is 2.
68-
/// </remarks>
90+
/// </para>
91+
/// </summary>
92+
[AddedVersion("1.0.0")]
93+
[DefaultValue(2)]
94+
[Description("Arc border width (in pixels).")]
95+
[ParameterTypeName("List<double>?")]
6996
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
7097
public List<double>? BorderWidth { get; set; }
7198

7299
/// <summary>
73100
/// By default the Arc is curved. If <see langword="false"/>, the Arc will be flat.
74-
/// </summary>
75-
/// <remarks>
101+
/// <para>
76102
/// Default value is <see langword="true"/>.
77-
/// </remarks>
103+
/// </para>
104+
/// </summary>
105+
[AddedVersion("1.0.0")]
106+
[DefaultValue(true)]
107+
[Description("By default the Arc is curved. If <b>false</b>, the Arc will be flat.")]
78108
public bool Circular { get; set; } = true;
79109

80-
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
81-
public PieChartDatasetDataLabels Datalabels { get; set; } = new();
110+
/// <summary>
111+
/// Gets or sets the data labels configuration for the polar area chart dataset.
112+
/// <para>
113+
/// Use this property to customize the display of data labels, such as their position, format, or
114+
/// visibility, in the pie chart dataset. If not set, a default configuration is applied.
115+
/// </para>
116+
/// <see href="https://chartjs-plugin-datalabels.netlify.app/guide/getting-started.html#configuration" />
117+
/// </summary>
118+
[AddedVersion("1.0.0")]
119+
[DefaultValue("new()")]
120+
[Description("Gets or sets the data labels configuration for the polar area chart dataset. Use this property to customize the display of data labels, such as their position, format, or visibility, in the pie chart dataset. If not set, a default configuration is applied.")]
121+
[ParameterTypeName(nameof(PolarAreaChartDatasetDataLabels))]
122+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
123+
public PolarAreaChartDatasetDataLabels Datalabels { get; set; } = new();
82124

83125
/// <summary>
84126
/// Arc background color when hovered.
85-
/// </summary>
86-
/// <remarks>
127+
/// <para>
87128
/// Default value is <see langword="null"/>.
88-
/// </remarks>
129+
/// </para>
130+
/// </summary>
131+
[AddedVersion("1.0.0")]
132+
[DefaultValue(null)]
133+
[Description("Arc background color when hovered.")]
134+
[ParameterTypeName("List<string>?")]
89135
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
90136
public List<string>? HoverBackgroundColor { get; set; }
91137

92138
/// <summary>
93139
/// Arc border color when hovered.
94-
/// </summary>
95-
/// <remarks>
140+
/// <para>
96141
/// Default value is <see langword="null"/>.
97-
/// </remarks>
142+
/// </para>
143+
/// </summary>
144+
[AddedVersion("1.0.0")]
145+
[DefaultValue(null)]
146+
[Description("Arc border color when hovered.")]
147+
[ParameterTypeName("List<string>?")]
98148
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
99149
public List<string>? HoverBorderColor { get; set; }
100150

101151
/// <summary>
102-
/// Arc border length and spacing of dashes when hovered.
103-
/// </summary>
104-
/// <remarks>
152+
/// Arc border length and spacing of dashes when hovered.
153+
/// <para>
105154
/// Default value is <see langword="null"/>.
106-
/// </remarks>
155+
/// </para>
156+
/// </summary>
157+
[AddedVersion("1.0.0")]
158+
[DefaultValue(null)]
159+
[Description("Arc border length and spacing of dashes when hovered.")]
160+
[ParameterTypeName("List<double>?")]
107161
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
108162
public List<double>? HoverBorderDash { get; set; }
109163

110164
/// <summary>
111165
/// Arc border offset for line dashes when hovered.
112-
/// </summary>
113-
/// <remarks>
166+
/// <para>
114167
/// Default value is <see langword="null"/>.
115-
/// </remarks>
168+
/// </para>
169+
/// </summary>
170+
[AddedVersion("1.0.0")]
171+
[DefaultValue(null)]
172+
[Description("Arc border offset for line dashes when hovered.")]
173+
[ParameterTypeName("double?")]
116174
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
117175
public double? HoverBorderDashOffset { get; set; }
118176

119177
/// <summary>
120178
/// Arc border join style when hovered.
121-
/// Supported values are 'round', 'bevel', 'miter'.
122-
/// </summary>
123-
/// <remarks>
179+
/// Supported values are 'round', 'bevel', and 'miter'.
180+
/// <para>
124181
/// Default value is <see langword="null"/>.
125-
/// </remarks>
182+
/// </para>
183+
/// </summary>
184+
[AddedVersion("1.0.0")]
185+
[DefaultValue(null)]
186+
[Description("Arc border join style when hovered. Supported values are <b>round</b>, <b>bevel</b>, and <b>miter</b>.")]
187+
[ParameterTypeName("List<string>?")]
126188
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
127189
public List<string>? HoverBorderJoinStyle { get; set; } // TODO: change this to enum
128190

129191
/// <summary>
130192
/// Arc border width when hovered (in pixels).
131-
/// </summary>
132-
/// <remarks>
193+
/// <para>
133194
/// Default value is <see langword="null"/>.
134-
/// </remarks>
195+
/// </para>
196+
/// </summary>
197+
[AddedVersion("1.0.0")]
198+
[DefaultValue(null)]
199+
[Description("Arc border width when hovered (in pixels).")]
200+
[ParameterTypeName("List<double>?")]
135201
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
136202
public List<double>? HoverBorderWidth { get; set; }
137203

BlazorExpress.ChartJS/Models/ChartOptions/LineChartOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class LineChartOptions : ChartOptions
4444
[AddedVersion("1.0.0")]
4545
[DefaultValue("new()")]
4646
[Description("Gets or sets the layout configuration for the chart.")]
47-
[ParameterTypeName("ChartLayout")]
47+
[ParameterTypeName(nameof(ChartLayout))]
4848
public ChartLayout Layout { get; set; } = new();
4949

5050
/// <summary>
@@ -56,7 +56,7 @@ public class LineChartOptions : ChartOptions
5656
[AddedVersion("1.0.0")]
5757
[DefaultValue("new()")]
5858
[Description("Gets or sets the collection of plugins associated with the line chart.")]
59-
[ParameterTypeName("LineChartPlugins")]
59+
[ParameterTypeName(nameof(LineChartPlugins))]
6060
public LineChartPlugins Plugins { get; set; } = new();
6161

6262
/// <summary>

BlazorExpress.ChartJS/Models/ChartOptions/PieChartOptions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ public class PieChartOptions : ChartOptions
44
{
55
#region Properties, Indexers
66

7+
/// <summary>
8+
/// Gets or sets the collection of plugins associated with the pie chart.
9+
/// <para>
10+
/// Default value is a new instance of <see cref="PieChartPlugins"/>.
11+
/// </para>
12+
/// </summary>
13+
[AddedVersion("1.0.0")]
14+
[DefaultValue("new()")]
15+
[Description("Gets or sets the collection of plugins associated with the pie chart.")]
16+
[ParameterTypeName(nameof(PieChartPlugins))]
717
public PieChartPlugins Plugins { get; set; } = new();
818

919
#endregion

BlazorExpress.ChartJS/Models/ChartOptions/PolarAreaChartOptions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ public class PolarAreaChartOptions : ChartOptions
44
{
55
#region Properties, Indexers
66

7+
/// <summary>
8+
/// Gets or sets the collection of plugins associated with the polar area chart.
9+
/// <para>
10+
/// Default value is a new instance of <see cref="PieChartPlugins"/>.
11+
/// </para>
12+
/// </summary>
13+
[AddedVersion("1.0.0")]
14+
[DefaultValue("new()")]
15+
[Description("Gets or sets the collection of plugins associated with the polar area chart.")]
16+
[ParameterTypeName(nameof(PolarAreaChartPlugins))]
717
public PolarAreaChartPlugins Plugins { get; set; } = new();
818

919
#endregion

0 commit comments

Comments
 (0)