This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 0fedfe03d5 feat(mcp): add stacked bar/area chart support (#37188)
0fedfe03d5 is described below
commit 0fedfe03d52c4790daeabec1cc85811463fc51f8
Author: Amin Ghadersohi <[email protected]>
AuthorDate: Wed Jan 21 14:10:16 2026 -0500
feat(mcp): add stacked bar/area chart support (#37188)
Co-authored-by: Claude Opus 4.5 <[email protected]>
---
superset/mcp_service/chart/chart_utils.py | 4 ++++
superset/mcp_service/chart/schemas.py | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/superset/mcp_service/chart/chart_utils.py
b/superset/mcp_service/chart/chart_utils.py
index 8c3ba13428..4597ac55b5 100644
--- a/superset/mcp_service/chart/chart_utils.py
+++ b/superset/mcp_service/chart/chart_utils.py
@@ -325,6 +325,10 @@ def map_xy_config(config: XYChartConfig) -> Dict[str, Any]:
if filter_config is not None
]
+ # Add stacking configuration
+ if getattr(config, "stacked", False):
+ form_data["stack"] = "Stack"
+
# Add configurations
add_axis_config(form_data, config)
add_legend_config(form_data, config)
diff --git a/superset/mcp_service/chart/schemas.py
b/superset/mcp_service/chart/schemas.py
index 48f3e45ba1..928858aea1 100644
--- a/superset/mcp_service/chart/schemas.py
+++ b/superset/mcp_service/chart/schemas.py
@@ -688,6 +688,10 @@ class XYChartConfig(BaseModel):
"If not specified, Superset will use its default behavior."
),
)
+ stacked: bool = Field(
+ False,
+ description="Stack bars/areas on top of each other instead of
side-by-side",
+ )
group_by: ColumnRef | None = Field(None, description="Column to group by")
x_axis: AxisConfig | None = Field(None, description="X-axis configuration")
y_axis: AxisConfig | None = Field(None, description="Y-axis configuration")