GeomSegment
Segment geometry: one finite line per data row from (x, y) to (xend, yend). Unlike rule, endpoints are data-mapped and do not span the panel.
Defaults
- geom
segment- default stat
identity- default position
identity- params type
SegmentParams
Svelte component
import { GGPlot, GeomSegment } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomSegment />
</GGPlot> JSON layer
{
"geom": "segment"
} Params
alphanumberSegment 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 segment 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
Allowed positions
identitydefault