Vega-Lite is a high-level declarative language built on Vega for specifying common data visualizations with concise JSON. Describe the data and intended visual form instead of manually programming every chart detail. section 2.1 section 3.1.2
A basic Vega-Lite specification organizes a visualization around these elements:
- Data identifies the visualization's source values. section 3.1.2
- Encoding maps fields to visual properties such as position, color, and size, with types including quantitative, ordinal, nominal, and temporal. section 3.1.2
- Mark selects visual elements such as bars, points, or lines. section 3.1.2
- Layer combines multiple marks, while params support interactive behavior such as hover-based selection. section 3.1.2
From fields to a chart
A concise specification can provide x and y fields, choose quantitative types, and select a line mark. Adding a point layer highlights individual observations; params can change mark properties in response to mouse events.
