GeomText
Text geometry: one label per data row at (x, y). No collision detection — labels draw exactly where placed. Requires x, y, and label channels.
Defaults
- geom
text- default stat
identity- default position
identity- params type
TextParams
Svelte component
import { GGPlot, GeomText } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomText />
</GGPlot> JSON layer
{
"geom": "text"
} Params
alphanumberText 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.