GeomPolygon

Polygon geometry: closed filled paths from (x, y) vertices in data/row order within each group. Groups form separate polygons. No x-sort (unlike line/area). Holes/subgroup omitted in v1.

Defaults

geom
polygon
default stat
identity
default position
identity
params type
PolygonParams

Svelte component

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

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

JSON layer

{
  "geom": "polygon"
}

Params

alpha

number

Polygon fill/stroke opacity. Must be between 0 and 1 (inclusive). Default 1.

linewidth

number

Outline stroke width in px. Must be greater than 0. Default matches line (1.5).

fillPaint

GradientPaint

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

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