On this page
Positions
6 positions
All positions
identityLeave mark coordinates unchanged. Default for most geoms: each mark keeps its post-stat (x, y).stackStack groups at each x slot so heights accumulate (positive up, negative down). Default for bar, col, histogram, and area; trains the scale on stacked totals.fillStack groups then rescale each x slot to proportions (positive and negative runs separately). Same geom set as stack; y domain becomes proportions.dodgePlace groups side by side within each x band instead of overlapping. Default for boxplot and violin; used when comparing categories at the same x.jitterAdd seeded random offsets so overplotted points separate. Configure with positionParams width/height/seed (always seeded for reproducibility).nudgeApply a fixed offset (positionParams.x / y) per mark — useful for labels beside points. Offsets are data units or band-step fractions.
How to set a position
Pass the position prop on a geom shell. Only values listed on
that geom's Geoms page validate. Omit it to use the
geom default.
import { GGPlot, GeomBar } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "category", fill: "group" }}>
<GeomBar position="dodge" />
</GGPlot>