GeomTile

Tile geometry: center-sized cells at (x, y) with optional width/height. Use for heatmaps and gridded categorical cells; supports stroke outlines.

Defaults

geom
tile
default stat
identity
default position
identity
params type
TileParams

Svelte component

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

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

JSON layer

{
  "geom": "tile"
}

Params

width

number

Constant tile width in data units after position transform (band axes: fraction of the band step). Default: resolution of unique x centers (continuous) or 1 (band).

height

number

Constant tile height in data units after position transform (band axes: fraction of the band step). Default: resolution of unique y centers (continuous) or 1 (band).

linewidth

number

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

alpha

number

Tile 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