Bar
Vertical and horizontal bars, stacking, and dodging.
The workhorse mark. Use bars when comparing values across categories.
barY
Vertical bars – categories on x, values on y:
barX
Horizontal bars – flip the axes. Good for long category labels:
Stacking
When fill maps to a field, bars stack by default. Each color segment shows its contribution to the total:
Dodging
Set group: "dodge" to place bars side-by-side. Better for comparing individual series values:
With value labels
Layer a text mark on top to add labels. Use shared top-level data so both marks read the same dataset:
Properties
| Field | Type | Default | Description |
|---|---|---|---|
group | "stack" | "dodge" | "stack" | How to group bars when a color field is present. |