CoordRadial
Polar/radial coordinates (ggplot2 coord_radial). Maps one aesthetic to angle and the other to radius for pie charts, coxcombs, and polar scatter. coord_polar is a helper alias with clip on.
Svelte component
import { GGPlot, GeomPoint, CoordRadial } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomPoint />
<CoordRadial />
</GGPlot> JSON and helpers
import { coordRadial } from "@ggsvelte/spec";
coordRadial() {
"coord": { "type": "sf", "ratio": 1 }
} Props
Options map 1:1 to the portable coord object (excluding the type discriminant). On CoordTransform, x and y also accept a
bare transform name string via the helper/shell sugar.
theta"x" | "y"Which aesthetic maps to angle: "x" (default) or "y". The other aesthetic maps to radius. Pie charts use theta: "y".
startnumberOffset of the starting angle from 12 o'clock, in radians (default 0). Positive angles proceed clockwise when reverse does not flip theta.
endnumberAngle where the plot ends, in radians measured from 12 o'clock. Default is start + 2π (full circle). Use with start for partial polar plots.
innerRadiusnumberSize of the inner radius hole as a fraction of the outer radius (0–1, default 0). Values above 0 produce a donut.
expandbooleanWhen true (default), add a small expansion so data does not sit on the axes. When false, limits come directly from the scale (typical for pie/coxcomb).
clipbooleanClip marks to the panel. ggplot2 coord_radial defaults to clip off; coord_polar defaults to clip on. ggsvelte stores the effective boolean (default false for type "radial").
reverse"none" | "theta" | "r" | "thetar"Which directions to reverse: "none" (default), "theta", "r", or "thetar" (both). coord_polar(direction = -1) maps to reverse: "theta".
thetaLimits[number, number]Optional [min, max] limits for the theta (angle) aesthetic in semantic units. Exactly two numbers.
rLimits[number, number]Optional [min, max] limits for the radius aesthetic in semantic units. Exactly two numbers.