Problem
In Graphic Walker, when creating a bar chart with:
- x: categorical field (e.g. Year)
- y: quantitative field (e.g. Revenue)
- color: categorical field (e.g. Company)
the current behavior always results in a stacked bar (or normalized / centered stack),
even when the analytical intent is to compare values side-by-side within the same x category.
There is currently no way to render a true "grouped (side-by-side) bar" where
each color category produces an independent bar within the same x value.
Observation
From inspecting the generated Vega-Lite spec and renderer behavior,
the key difference between stacked vs grouped bar appears to be whether
the y encoding has stack enabled.
In Vega-Lite, a grouped bar can be achieved by explicitly disabling stacking:
y: {
field: "...",
type: "quantitative",
stack: null
}
Minimal logic proposal
A minimal and non-invasive way to support grouped bars could be:
- Detect grouped-bar intent
const isGrouped = !!(colorField && xField && colorField !== xField);
- Disable stacking on y encoding for grouped bars
if (isGrouped && mark === "bar") {
yEncoding.stack = null;
}
This does not introduce facet, multi-view, or additional UI complexity.
It only changes the stacking behavior when a color dimension exists
and a grouped comparison is desired.
Why this works well for Graphic Walker
- Uses standard Vega-Lite semantics (no custom renderer required)
- Minimal change in spec generation
- No need to expose raw "facet" concepts in the UI
- Aligns with common BI expectations (Tableau-style grouped bar)
- Keeps existing Stack / Normalize / Center modes intact
A new UI option such as "Grouped (side-by-side)" could internally map to
this behavior without changing the overall UX philosophy.
Expected result
For:
- x = Year
- y = Revenue
- color = Company
Bars should render side-by-side within each Year,
instead of being merged into a single stacked bar.
If this direction makes sense, I’m happy to help with a PoC or PR.
Note: This proposal focuses on rendering behavior only.
UI exposure (toggle or preset) can be discussed separately.
Problem
In Graphic Walker, when creating a bar chart with:
the current behavior always results in a stacked bar (or normalized / centered stack),
even when the analytical intent is to compare values side-by-side within the same x category.
There is currently no way to render a true "grouped (side-by-side) bar" where
each color category produces an independent bar within the same x value.
Observation
From inspecting the generated Vega-Lite spec and renderer behavior,
the key difference between stacked vs grouped bar appears to be whether
the y encoding has
stackenabled.In Vega-Lite, a grouped bar can be achieved by explicitly disabling stacking:
Minimal logic proposal
A minimal and non-invasive way to support grouped bars could be:
This does not introduce facet, multi-view, or additional UI complexity.
It only changes the stacking behavior when a color dimension exists
and a grouped comparison is desired.
Why this works well for Graphic Walker
A new UI option such as "Grouped (side-by-side)" could internally map to
this behavior without changing the overall UX philosophy.
Expected result
For:
Bars should render side-by-side within each Year,
instead of being merged into a single stacked bar.
If this direction makes sense, I’m happy to help with a PoC or PR.
Note: This proposal focuses on rendering behavior only.
UI exposure (toggle or preset) can be discussed separately.