GeomStep

Step-line geometry: connect points with hv/vh/mid stairs. Same channels as line; ordered by x within groups.

Defaults

geom
step
default stat
identity
default position
identity
params type
StepParams

Svelte component

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

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

JSON layer

{
  "geom": "step"
}

Params

alpha

number

Step-line opacity. Must be between 0 and 1 (inclusive). Default 1.

linewidth

number

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

direction

"hv" | "vh" | "mid"

Step corner placement: "hv" horizontal then vertical (default), "vh" vertical then horizontal, "mid" change at the midpoint between x positions.

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