Skip to main content

Module spec

Module spec 

Source
Expand description

The chart specification: a strict subset of Vega-Lite’s JSON grammar.

Unknown fields are rejected at parse time (deny_unknown_fields) so that callers emitting full Vega-Lite get a correctable error instead of a silently wrong chart.

Structs§

BinConfig
The object form of bin. deny_unknown_fields rejects stray keys with a named message; both knobs stay permissive Option<f64> so preflight validates ranges with teaching errors. Neither present ({}) means automatic binning, exactly like true.
Channel
Column
Strict twin of ingest::EnvColumn: the spec is agent-authored, so unknown keys are rejected here.
Data
Inline data: tidy row objects, OR columnar columns + rows. Exactly one form — ingest::resolve enforces it (serde can’t express either/or here without wrecking error paths).
Encoding
Spec

Enums§

Aggregate
BinValue
"bin": true | {"maxbins": N} | {"step": w}. false is accepted and means absent (Vega-Lite emits it; rejecting would be noise). Numbers stay permissive (f64) so preflight can TEACH — serde must not bounce maxbins: 0 with a generic type error before validation can explain it.
FieldType
Mark
TimeUnit
A calendar-truncation bucket unit for timeUnit (temporal bars). Ordered coarse-relevant but semantics are per-variant: truncate a timestamp to this unit’s boundary, KEEPING the year (design §spec semantics). Week anchors to Monday.