GeomLabel
Label geometry: text with a rounded rectangular background box. Requires x, y, and label channels. Labels draw exactly where placed unless params.checkOverlap skips colliding ones.

Defaults
- geom
label- default stat
identity- default position
identity- params type
LabelParams
Svelte component
import { GGPlot, GeomLabel } from "@ggts-sh/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomLabel />
</GGPlot> JSON layer
{
"geom": "label"
} Params
alphanumberLabel opacity. Must be between 0 and 1 (inclusive). Default 1.
sizenumberFont size in px. Must be greater than 0. Default 11.
anchor"start" | "middle" | "end"Horizontal text anchor relative to the (x, y) position: "start", "middle" (default), or "end".
dxnumberHorizontal offset in px applied after positioning. Default 0.
dynumberVertical offset in px applied after positioning (positive = down). Default 0.
checkOverlapbooleanDrop labels that overlap an earlier retained label in the same layer and panel (greedy, draw order). Default false: labels draw exactly where placed. Overlaps emit a text-label-overlap warning naming the layer index and overlapping mark count.
paddingnumberUniform box padding around the text in px. Default 3.
radiusnumberCorner radius of the background box in px. Default 3.
linewidthnumberBox outline stroke width in px. Default 0.5.
Allowed stats
identitydefault