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.
Software
- Vega-Lite — High-level grammar compiling to Vega - BSD-3-Clause. · BSD-3-Clause · github.com/vega/vega-lite
- Vega — Full grammar runtime for richer interaction. · BSD-3-Clause · github.com/vega/vega
- Altair — Python API that emits Vega-Lite for analysts. · BSD-3-Clause · github.com/vega/altair
- Observable Plot — Sister grammar with a JS-first feel. · ISC · github.com/observablehq/plot
- D3 — Escape hatch for marks Vega-Lite cannot express. · ISC · github.com/d3/d3
Exports
- Exports 1 — SVG
- Exports 2 — PDF
- Exports 3 — EMF/SVG into slides (no screenshots)
- Exports 4 — SVG for web, PDF for print
Accessibility
- Accessibility 1 — Never hue alone. Stack pattern, label and position.
- Accessibility 2 — 4.5:1 for text, 3:1 for large marks.
- Accessibility 3 — Short alt text on the chart; numbers also as an HTML table.
- Accessibility 4 — Motion only as emphasis. Honour prefers-reduced-motion.
Vega-Lite grammar: honour unit specifications of mark + encoding channels, and switch when you only need one disposable bar for a meeting invite.