GeomRule
Rule geometry: reference lines spanning the panel. Two forms: (1) annotation — set params.xintercept and/or params.yintercept to fixed data values and map neither aes.x nor aes.y; (2) data-driven — map exactly one of aes.x (vertical rules) or aes.y (horizontal rules) to a field. Never mix the forms in one layer.

Defaults
- geom
rule- default stat
identity- default position
identity- params type
RuleParams
Svelte component
import { GGPlot, GeomRule } from "@ggts-sh/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomRule />
</GGPlot> JSON layer
{
"geom": "rule"
} Params
xinterceptRuleInterceptANNOTATION FORM ONLY: draw a vertical rule at each of these fixed x positions. Mutually exclusive with mapping aes.x/aes.y on this layer.
yinterceptRuleInterceptANNOTATION FORM ONLY: draw a horizontal rule at each of these fixed y positions. Mutually exclusive with mapping aes.x/aes.y on this layer.
alphanumberRule opacity. Must be between 0 and 1 (inclusive). Default 1.
linewidthnumberStroke width in px. Must be greater than 0. Default 1.
linetype"solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash"Constant stroke pattern, as in geom_hline(linetype = "dashed"). One of "solid", "dashed", "dotted", "dotdash", "longdash", "twodash". Default "solid". A constant aes.linetype wins over this param.
strokePaintGradientPaintWithin-mark gradient stroke paint (not a data scale). Requires a solid fallback.
glowGlowSpecBounded within-mark glow treatment (not theme decoration).
Allowed stats
Allowed positions
identitydefault