GeomVline

Vertical reference-line alias. Canonicalized by normalize() to a rule layer. Annotation form: set params.xintercept. Data-driven form: map aes.x (inherited plot y is dropped so the one-axis rule contract holds).

Defaults

geom
vline
default stat
identity
default position
identity
params type
VlineParams

Alias

normalize() rewrites this geom to rule (with this alias's default stat and position). Prefer the canonical geom in new code.

Svelte component

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

<GGPlot data={rows}>
  <GeomVline />
</GGPlot>

JSON layer

{
  "geom": "vline"
}

Params

xintercept

RuleIntercept

ANNOTATION FORM ONLY: draw a vertical rule at each of these fixed x positions. Mutually exclusive with mapping aes.x on this layer.

alpha

number

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

linewidth

number

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

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