GeomCurve

Curve geometry: one curved connector per row from (x, y) to (xend, yend). Tessellated as a quadratic Bezier (curvature/angle/ncp). Requires field-mapped x, y, xend, and yend.

Defaults

geom
curve
default stat
identity
default position
identity
params type
CurveParams

Svelte component

import { GGPlot, GeomCurve } from "@ggsvelte/svelte";

<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
  <GeomCurve />
</GGPlot>

JSON layer

{
  "geom": "curve"
}

Params

curvature

number

Amount of bend away from the straight chord. 0 is a straight line; default 0.5. Positive bows to the right of the start→end direction when angle is 90.

angle

number

Control-point direction relative to the chord, in degrees. default 90 (perpendicular).

ncp

number

Smoothness density knob. Maps to tessellation sample count = max(8, ncp×8); not multi-control xspline. Default 5.

alpha

number

Curve 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 curve 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