Darker cells mean a higher score for this topic on that metric.
LessMore
Last reviewed Sources & creditsMedia creditsMethodology
Quick answers
When should I pick Vega-Lite grammar?
When the story is: reproducible analysis figures, teaching encodings, notebooks.
When should I avoid Vega-Lite grammar?
Skip it in cases like: you only need one disposable bar for a meeting invite.
Who invented or popularised it?
Vega-Lite from the University of Washington Interactive Data Lab
What does it encode?
unit specifications of mark + encoding channels
Is it OK in ads?
Yes if one claim is visible at a glance in Meta, Google and retail print; otherwise link to a full figure.
Will a teacher accept it?
Yes for lab reports and poster boards if axes, units and a source line are present.
Vega-Lite grammar encodes values as unit specifications of mark + encoding channels. Vega-Lite from the University of Washington Interactive Data Lab.
In reports, ads and assignments it fits reproducible analysis figures, teaching encodings, notebooks. Skip it when you only need one disposable bar for a meeting invite.
Parts
- Mark — The core mark of Vega-Lite grammar is unit specifications of mark + encoding channels.
- Scale — The scale must show zero (or a declared break) and units.
- Axis — Axis titles name the variable, not a mood.
- Legend — A legend is weaker than a direct label. Write beside the mark when you can.
- Label — Numbers are optional. If comparison is the job, label the ends only.
- Grid — Keep the grid faint. Data should own the ink.
- Annotation — One annotation sentence. Date the source.
- Frame — A thin frame. Never a 3-D box.
Variants
- JSON grammar — Variant 1 of Vega-Lite grammar (JSON grammar). Same encoding, different layout.
- Encoding spec — Variant 2 of Vega-Lite grammar (Encoding spec). Same encoding, different layout.
- UW Interactive Data Lab — Variant 3 of Vega-Lite grammar (UW Interactive Data Lab). Same encoding, different layout.
- Vega-Lite grammar 4 — Variant 4 of Vega-Lite grammar (Vega-Lite grammar 4). Same encoding, different layout.
Labels
- Axis — On Vega-Lite grammar, make Mark readable.
- Legend — On Vega-Lite grammar, make Scale readable.
- Label — On Vega-Lite grammar, make Axis readable.
- Grid — On Vega-Lite grammar, make Legend readable.
- Annotation — On Vega-Lite grammar, make Label readable.
Vega-Lite grammar: honour unit specifications of mark + encoding channels, and switch when you only need one disposable bar for a meeting invite.