GraphProvider as the data prop; the spec references that table’s columns by key through its mapping. Keeping them apart means the same spec can be re-used across datasets, and the same data can be drawn several ways.
Basic structure
Data is a table with explicitly defined columns and rows:columns array defines the shape; rows holds the values.
Referencing columns from a spec
A spec never contains data — it names the columns it needs through its mapping. The variable strings you pass tomapping (or the createSpec shorthand) are column keys:
label on a column is purely presentational — it’s what shows in axes, legends and tooltips. If you omit it, the key is used.
Row keys must exactly match a column
key. Values under keys with no matching
column definition are ignored.Value format detection
Graphy inspects each column’s values and infers a value format — this drives how a scale interprets the column and how the renderer formats it. The first match wins.Numbers
Numbers and numeric strings are detected as quantitative values. Thousands separators, decimals and magnitude suffixes are supported:Dates
Date-like strings are parsed automatically across a wide range of formats — ISO dates, named months and locale-specific orderings:Jan, Feb) are recognised alongside full names. Set data._metadata.parsingLocale to control whether ambiguous dates like 01/02/2024 are read as DD/MM (en-GB) or MM/DD (en-US).
Weekly date ranges are also detected — values like 1 Feb – 7 Feb or 1 Feb 2024 – 7 Feb 2024 representing 7-day spans.
Percentages
Values with a% suffix are detected as percentages:
Currencies
Currency-formatted strings are parsed with automatic symbol recognition. Supported symbols:$, €, £, ¥, ₹, ₱, ₩, ₪, ₫, ₽, ฿, ₦, ₺, zł, kr, Fr, R, R$, Rp, RM, د.إ, ﷼, Ch$, NT$, HK$, S$, A$, C$, NZ$, MX$.
-$100, $-100).
Text
Any value that doesn’t match the above is treated as text (categorical data).How formats reach scales
The inferred format feeds the scale you declare for each aesthetic. Calling a position scale bare (scale.x()) lets the engine choose a scale type from the column’s format:
- A text column → a discrete (band) scale.
- A numeric, percentage or currency column → a continuous scale.
- A date column → a temporal scale.
scale.x.continuous(), scale.x.discrete(), scale.x.datetime() — when you want to force a particular treatment. See the line chart guide for worked examples.
Missing values
Usenull for a missing cell. How a geom treats gaps is geom-specific — for lines, the missingValues param chooses whether to break the path, bridge it, or treat the gap as zero.
Schema
Array of column definitions. Each column defines the structure and metadata
for a data field.
Unique, stable identifier for the column. Must match the keys used in
rows
objects, and is what a spec’s mapping references.Human-readable label shown in the UI (axis labels, legends, tooltips).
Defaults to the
key if not provided.Array of data rows. Each row is an object with keys matching the column keys.
Values can be a
string, number, Date or null.Optional metadata for parsing and advanced data processing.

