Vega and Vega-Lite

Learn about the basics of Vega and Vega-Lite and render a sample graph in Vega.

Vega is a visualization grammar that describes the visual appearance and interactive behavior of a chart. To create a design, we’ll write the code in JSON format, and Vega will generate a web-based view using HTML5 Canvas or SVG.

We define a Vega visualization through a specification. A specification is composed of properties and definitions for the data to visualize. The following piece of code shows a basic example of a Vega specification.

Get hands-on with 1200+ tech skills courses.