position: "stack"

Stack 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.

Usage

import { GGPlot, GeomCol } from "@ggsvelte/svelte";

<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
  <GeomCol position="stack" />
</GGPlot>
{
  "geom": "col",
  "position": "stack"
}

positionParams

This position has no positionParams. Only jitter (width, height, seed) and nudge (x, y) accept parameters.

Default for geoms

Compatible geoms

Examples

← All positions · Geoms · Stats