CoordFixed
Fixed physical data-unit aspect ratio (y-unit length / x-unit length). Layout fits the largest centered data rectangle after chart chrome; rejects free positional facet scales.
Svelte component
import { GGPlot, GeomPoint, CoordFixed } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomPoint />
<CoordFixed ratio={1} />
</GGPlot> JSON and helpers
import { coordFixed } from "@ggsvelte/spec";
coordFixed({ ratio: 1 })
// → { type: "fixed" } // ratio 1 is the default and normalize() may drop it {
"coord": { "type": "fixed", "ratio": 2 }
} 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.
rationumberPhysical y-unit length divided by physical x-unit length (default 1, equal units).
Also exported as
CoordEqual
Binding-identical re-export of CoordFixed (equal-unit spelling
of fixed aspect).
Related
- Facets and coordinates
- Free positional facet scales fail with
coord-fixed-free-scales