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

angle

number

Constant spoke direction in radians when aes.angle is not mapped. 0 = +x, π/2 = +y.

radius

number

Constant spoke length in data units when aes.radius is not mapped. Must be greater than 0.

alpha

number

Spoke opacity. Must be between 0 and 1 (inclusive). Default 1.

linewidth

number

Stroke width in px. Must be greater than 0. Default 1.

lineend

"butt" | "round" | "square"

SVG stroke-linecap for spoke ends. Default "butt".

strokePaint

GradientPaint

Within-mark gradient stroke paint (not a data scale). Requires a solid fallback.

glow

GlowSpec

Bounded within-mark glow treatment (not theme decoration).

Allowed stats

Allowed positions

Examples

← All geoms · Getting started