Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix variable shadowing bug in vconcat handling (#207)

Akshay Agrawalf72837f31f48
diff --git a/marimo/_plugins/ui/_impl/altair_chart.py b/marimo/_plugins/ui/_impl/altair_chart.py
index b9bc421764..3d5f14f8a4 100644
--- a/marimo/_plugins/ui/_impl/altair_chart.py
+++ b/marimo/_plugins/ui/_impl/altair_chart.py
@@ -191,9 +191,9 @@ class altair_chart(UIElement[ChartSelection, "pd.DataFrame"]):
# Fix the sizing for vconcat charts
if "vconcat" in vega_spec:
- for chart in vega_spec["vconcat"]:
- if "width" not in chart:
- chart["width"] = "container"
+ for subchart in vega_spec["vconcat"]:
+ if "width" not in subchart:
+ subchart["width"] = "container"
# without autosize, vconcat will overflow
if "autosize" not in vega_spec:
vega_spec["autosize"] = "fit-x"