Skip to content

Commit 971ed31

Browse files
committed
Improve documentation and add EditorRequired attribute
Updated the `BarChartDataset` class to enhance the clarity of the documentation for the `SkipNull`, `XAxisID`, and `YAxisID` properties. The descriptions now specify the behavior when these properties are set to true. Additionally, the `ChartDataset` class has been modified to include an `EditorRequired` attribute for the `Data` property, indicating its necessity in the editor context. NOTE: This commit message is auto-generated using GitHub Copilot.
1 parent 3a27b12 commit 971ed31

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,41 +244,41 @@ public class BarChartDataset : ChartDataset<double?>
244244
//https://www.chartjs.org/docs/latest/configuration/elements.html#point-styles
245245

246246
/// <summary>
247-
/// Gets or sets a value indicating whether null or undefined values will not be used for spacing calculations when determining bar size.
247+
/// If true, null or undefined values will not be used for spacing calculations when determining bar size.
248248
/// <para>
249249
/// Default value is <see langword="false" />.
250250
/// </para>
251251
/// </summary>
252252
[AddedVersion("1.0.0")]
253253
[DefaultValue(false)]
254-
[Description("Gets or sets a value indicating whether null or undefined values will not be used for spacing calculations when determining bar size.")]
254+
[Description("If <b>true</b>, null or undefined values will not be used for spacing calculations when determining bar size.")]
255255
public bool SkipNull { get; set; }
256256

257257
//Stack
258258
//https://www.chartjs.org/docs/latest/charts/bar.html#general
259259

260260
/// <summary>
261-
/// Gets or sets the ID of the x axis to plot this dataset on.
261+
/// The ID of the x-axis to plot this dataset on.
262262
/// <para>
263263
/// Default value is first x axis.
264264
/// </para>
265265
/// </summary>
266266
[AddedVersion("1.0.0")]
267267
[DefaultValue(null)]
268-
[Description("Gets or sets the ID of the x axis to plot this dataset on.")]
268+
[Description("The ID of the x-axis to plot this dataset on.")]
269269
[ParameterTypeName("string?")]
270270
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
271271
public string? XAxisID { get; set; }
272272

273273
/// <summary>
274-
/// Gets or sets the ID of the y axis to plot this dataset on.
274+
/// The ID of the y-axis to plot this dataset on.
275275
/// <para>
276276
/// Default value is first y axis.
277277
/// </para>
278278
/// </summary>
279279
[AddedVersion("1.0.0")]
280280
[DefaultValue(null)]
281-
[Description("Gets or sets the ID of the y axis to plot this dataset on.")]
281+
[Description("The ID of the y-axis to plot this dataset on.")]
282282
[ParameterTypeName("string?")]
283283
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
284284
public string? YAxisID { get; set; }

BlazorExpress.ChartJS/Models/ChartDataset/ChartDataset.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public ChartDataset()
4242
[AddedVersion("1.0.0")]
4343
[DefaultValue(null)]
4444
[Description("Get or sets the Data.")]
45+
[EditorRequired]
4546
[ParameterTypeName("List<TData>?")]
4647
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
4748
public List<TData>? Data { get; set; }

0 commit comments

Comments
 (0)