From 8e51c18cf0132cae2d23c4b1f266909846434464 Mon Sep 17 00:00:00 2001
From: berndlueneburg <77238268+berndlueneburg@users.noreply.github.com>
Date: Mon, 18 May 2026 06:37:10 +0200
Subject: [PATCH 1/2] Add Stack property to BarChartDataset
Added Stack property to BarChartDataset for dataset grouping.
---
.../ChartDataset/BarChart/BarChartDataset.cs | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/BlazorExpress.ChartJS/Models/ChartDataset/BarChart/BarChartDataset.cs b/BlazorExpress.ChartJS/Models/ChartDataset/BarChart/BarChartDataset.cs
index 15d5ab80..d36f4093 100644
--- a/BlazorExpress.ChartJS/Models/ChartDataset/BarChart/BarChartDataset.cs
+++ b/BlazorExpress.ChartJS/Models/ChartDataset/BarChart/BarChartDataset.cs
@@ -275,8 +275,20 @@ public BarChartDataset()
[Description("If true, null or undefined values will not be used for spacing calculations when determining bar size.")]
public bool SkipNull { get; set; }
- //Stack
- //https://www.chartjs.org/docs/latest/charts/bar.html#general
+ ///
+ /// The ID of the group to which this dataset belongs. Datasets sharing the same
+ /// stack are stacked together; datasets with different stacks render side by side.
+ ///
+ /// Default value is .
+ ///
+ ///
+ ///
+ [AddedVersion("1.2.3")]
+ [DefaultValue(null)]
+ [Description("The ID of the group to which this dataset belongs. Datasets sharing the same stack are stacked together; datasets with different stacks render side by side.")]
+ [ParameterTypeName("string?")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? Stack { get; set; }
///
/// The ID of the x-axis to plot this dataset on.
From d53fa7c15d1e50ecbce37160b8c2fd5b856375d7 Mon Sep 17 00:00:00 2001
From: berndlueneburg <77238268+berndlueneburg@users.noreply.github.com>
Date: Mon, 18 May 2026 06:40:34 +0200
Subject: [PATCH 2/2] Add Stack property to LineChartDataset
Added Stack property to LineChartDataset for dataset grouping.
---
.../ChartDataset/LineChart/LineChartDataset.cs | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/BlazorExpress.ChartJS/Models/ChartDataset/LineChart/LineChartDataset.cs b/BlazorExpress.ChartJS/Models/ChartDataset/LineChart/LineChartDataset.cs
index 3959c700..d56aafe4 100644
--- a/BlazorExpress.ChartJS/Models/ChartDataset/LineChart/LineChartDataset.cs
+++ b/BlazorExpress.ChartJS/Models/ChartDataset/LineChart/LineChartDataset.cs
@@ -563,8 +563,21 @@ public LineChartDataset FillToValue(double value)
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? SpanGaps { get; set; }
- //stack
- //https://www.chartjs.org/docs/latest/charts/line.html#general
+ ///
+ /// The ID of the group to which this dataset belongs. On a stacked scale,
+ /// datasets sharing the same stack are stacked together; datasets with
+ /// different stacks are drawn independently.
+ ///
+ /// Default value is .
+ ///
+ ///
+ ///
+ [AddedVersion("1.2.3")]
+ [DefaultValue(null)]
+ [Description("The ID of the group to which this dataset belongs. Datasets sharing the same stack are stacked together; datasets with different stacks are drawn independently.")]
+ [ParameterTypeName("string?")]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? Stack { get; set; }
///
/// If the stepped value is set to anything other than , tension will be ignored.