Skip to content

Commit 21a8117

Browse files
committed
Enhance chart dataset properties and documentation
- Added `CategoryPercentage` to `BarChartDataset` for data label customization. - Introduced `Circumference` in `DoughnutChartDataset` with updated `Datalabels` documentation. - Added `CubicInterpolationMode` to `LineChartDataset` and improved `Datalabels` documentation. - Updated multiple properties in `PieChartDataset` with detailed documentation. - Introduced new properties in `LineChartOptions` for `Interaction`, `Layout`, and `Plugins` with comprehensive descriptions. NOTE: This commit message is auto-generated using GitHub Copilot.
1 parent 1fb7444 commit 21a8117

5 files changed

Lines changed: 191 additions & 69 deletions

File tree

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,13 @@ public class BarChartDataset : ChartDataset<double?>
116116
/// <summary>
117117
/// Gets or sets the data labels configuration for the bar chart dataset.
118118
/// <para>
119-
/// Default value is a new <see cref="BarChartDatasetDataLabels" /> instance.
119+
/// This property allows customization of data labels, such as their appearance, positioning, and
120+
/// formatting. If not set, the default configuration will be used.
120121
/// </para>
121122
/// </summary>
122123
[AddedVersion("1.0.0")]
123-
[DefaultValue(null)]
124-
[Description("Gets or sets the data labels configuration for the bar chart dataset.")]
124+
[DefaultValue("new()")]
125+
[Description("Gets or sets the data labels configuration for the bar chart dataset. This property allows customization of data labels, such as their appearance, positioning, and formatting. If not set, the default configuration will be used.")]
125126
[ParameterTypeName("BarChartDatasetDataLabels")]
126127
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
127128
public BarChartDatasetDataLabels Datalabels { get; set; } = new();

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,19 @@ public class DoughnutChartDataset : ChartDataset<double?>
133133
//Clip
134134
//https://www.chartjs.org/docs/latest/charts/doughnut.html#general
135135

136+
/// <summary>
137+
/// Gets or sets the data labels configuration for the doughnut chart dataset.
138+
/// <para>
139+
/// Use this property to customize the display of data labels, such as their font, color,
140+
/// alignment, and visibility, for the doughnut chart dataset.
141+
/// </para>
142+
/// </summary>
136143
[AddedVersion("1.0.0")]
137144
[DefaultValue("new()")]
138-
[Description("")]
145+
[Description("Gets or sets the data labels configuration for the doughnut chart dataset. Use this property to customize the display of data labels, such as their font, color, alignment, and visibility, for the doughnut chart dataset.")]
139146
[ParameterTypeName("DoughnutChartDatasetDataLabels")]
140147
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
141-
public DoughnutChartDatasetDataLabels Datalabels { get; set; } = new(); // TODO: add the reference link
148+
public DoughnutChartDatasetDataLabels Datalabels { get; set; } = new();
142149

143150
/// <summary>
144151
/// Arc background color when hovered.

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,19 @@ public LineChartDataset FillToValue(double value)
220220
[Description("Supported values are 'default', and 'monotone'.")]
221221
public string CubicInterpolationMode { get; set; } = "default";
222222

223+
/// <summary>
224+
/// Gets or sets the data labels configuration for the line chart dataset.
225+
/// <para>
226+
/// Use this property to customize the display of data labels, such as their position,
227+
/// formatting, and visibility, for the dataset in the line chart.
228+
/// </para>
229+
/// </summary>
223230
[AddedVersion("1.0.0")]
224231
[DefaultValue("new()")]
225-
[Description("")]
232+
[Description("Gets or sets the data labels configuration for the line chart dataset. Use this property to customize the display of data labels, such as their position, formatting, and visibility, for the dataset in the line chart.")]
226233
[ParameterTypeName("LineChartDatasetDataLabels")]
227234
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
228-
public LineChartDatasetDataLabels Datalabels { get; set; } = new(); // TODO: add the reference link
235+
public LineChartDatasetDataLabels Datalabels { get; set; } = new();
229236

230237
/// <summary>
231238
/// Draw the active points of a dataset over the other points of the dataset.

0 commit comments

Comments
 (0)