GeomRect

Rectangle geometry: one rectangle per data row from mapped xmin/xmax/ymin/ymax edges. Use for arbitrary shaded regions and time bands.

Defaults

geom
rect
default stat
identity
default position
identity
params type
RectParams

Svelte component

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

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

JSON layer

{
  "geom": "rect"
}

Params

linewidth

number

Outline stroke width in px when color is set. Must be greater than 0.

alpha

number

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

fillPaint

GradientPaint

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

strokePaint

GradientPaint

Within-mark gradient outline 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