CoordFlip
Swap display axes so semantic x paints vertically and y horizontally. The mechanism for horizontal bar charts; stack, dodge, and hit-testing follow the flip.
Svelte component
import { GGPlot, GeomPoint, CoordFlip } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomPoint />
<CoordFlip />
</GGPlot> JSON and helpers
// Builder
import { gg } from "@ggsvelte/spec";
gg(rows, aes({ x: "category", y: "value" }))
.geomCol()
.coordFlip()
.build();
// → { …, coord: { type: "flip" } } {
"coord": { "type": "flip" }
} Props
CoordFlip has no option props — only the fixed
portable type: "flip".