On this page

CoordCartesian

Default Cartesian coordinates. Omit coord or use CoordCartesian to clear a prior REPLACE-family coord; normalize() drops bare { type: "cartesian" }.

Svelte component

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

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

Declaration-only: emits no markup. Registers a live coord layer on init; inert without a <GGPlot> ancestor. Coords are REPLACE — the last registered coord wins.

JSON and helpers

// Default when coord is omitted. Explicit clear under REPLACE:
// <CoordCartesian /> → { type: "cartesian" } (normalize() drops bare cartesian)
// Omit coord for the default. Explicit object (dropped by normalize when bare):
{
  "coord": { "type": "cartesian" }
}

No free-standing helper — omit coord, or use <CoordCartesian /> to clear under REPLACE. Schema type: CoordCartesianSpec. Portable type: "cartesian". Builder: .coord().

Props

CoordCartesian has no option props — only the fixed portable type: "cartesian".

← All coords · Scales · Facets and coordinates