GeomSpoke
Spoke geometry: one finite segment per row from (x, y) in direction angle (radians) with length radius. Endpoints are derived as xend = x + radius·cos(angle), yend = y + radius·sin(angle) in data space, then transformed like x/y. Requires continuous x and y.
Defaults
- geom
spoke- default stat
identity- default position
identity- params type
SpokeParams
Svelte component
import { GGPlot, GeomSpoke } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomSpoke />
</GGPlot> JSON layer
{
"geom": "spoke"
} Params
anglenumberConstant spoke direction in radians when aes.angle is not mapped. 0 = +x, π/2 = +y.
radiusnumberConstant spoke length in data units when aes.radius is not mapped. Must be greater than 0.
alphanumberSpoke opacity. Must be between 0 and 1 (inclusive). Default 1.
linewidthnumberStroke width in px. Must be greater than 0. Default 1.
lineend"butt" | "round" | "square"SVG stroke-linecap for spoke ends. Default "butt".
strokePaintGradientPaintWithin-mark gradient stroke paint (not a data scale). Requires a solid fallback.
glowGlowSpecBounded within-mark glow treatment (not theme decoration).
Allowed stats
identitydefault
Allowed positions
identitydefault