Example Gallery

This page shows example specifications for different types of graphics. To see example code for embedding visualizations in a webpage, please read the embed documentation.

Single-View Plots

Bar Charts & Histograms

Simple Bar Chart Aggregate Bar Chart Aggregate Bar Chart (Sorted) Histogram Histogram (from Binned Data) Log-scaled Histogram Grouped Bar Chart Stacked Bar Chart Horizontal Stacked Bar Chart Normalized (Percentage) Stacked Bar Chart Gantt Chart (Ranged Bar Marks) A Bar Chart Encoding Color Names in the Data Layered Bar Chart Diverging Stacked Bar Chart (Population Pyramid) Diverging Stacked Bar Chart (with Neutral Parts) Simple Bar Chart with Labels Wilkinson Dot Plot Isotype Bar Chart Isotype Bar Chart with Emoji

Scatter & Strip Plots

Scatterplot 1D Strip Plot Strip Plot Colored Scatterplot Binned Scatterplot Bubble Plot Scatterplot with Null Values in Grey Scatterplot with Filled Circles Bubble Plot (Gapminder) Bubble Plot (Natural Disasters) Scatter Plot with Text Marks

Line Charts

Line Chart Line Chart with Point Markers Line Chart with Stroked Point Markers Multi Series Line Chart Slope Graph Step Chart Line Chart with Monotone Interpolation Line Chart with Conditional Grid Dash Connected Scatterplot (Lines with Custom Paths) Line Chart with Varying Size (using the trail mark) Line Chart with Markers and Invalid Values Carbon Dioxide in the Atmosphere Line Charts Showing Ranks Over Time Drawing Sine and Cosine Curves with the Sequence Generator

Area Charts & Streamgraphs

Area Chart Area Chart with Gradient Area Chart with Overlaying Lines and Point Markers Stacked Area Chart Normalized Stacked Area Chart Streamgraph Horizon Graph Mosaic Chart with Labels

Table-based Plots

Table Heatmap Annual Weather Heatmap Table Binned heatmap Table Bubble Plot (Github Punch Card) Heatmap with Labels Lasagna Plot (Dense Time-Series Heatmap)

Advanced Calculations

Calculate Percentage of Total Calculate Difference from Average Calculate Difference from Annual Average Calculate Residuals Line Charts Showing Ranks Over Time Waterfall Chart of Monthly Profit and Loss Filtering Top-K Items <span class=”image” alt=”Top-K Plot with “Others”” style=”background-image: url(/vega-lite/examples/compiled/window_top_k_others.svg);background-size: 110%”></span> Top-K Plot with “Others” Using the lookup transform to combine data Cumulative Frequency Distribution Layered Histogram and Cumulative Histogram Parallel Coordinate Plot Bar Chart Showing Argmax Value Layering Averages over Raw Values Layering Rolling Averages over Raw Values

Composite Mark

Error Bars & Error Bands

Error Bars Showing Confidence Interval Error Bars Showing Standard Deviation Line Chart with Confidence Interval Band Scatterplot with Mean and Standard Deviation Overlay

Box Plots

Box Plot with Min/Max Whiskers Tukey Box Plot (1.5 IQR)

Layered Plots

Labeling & Annotation

Simple Bar Chart with Labels Layering text over heatmap Carbon Dioxide in the Atmosphere Bar Chart Highlighting Values beyond a Threshold Mean overlay over precipitation chart Histogram with a Global Mean Overlay Line Chart with Highlighted Rectangles Layering Averages over Raw Values Layering Rolling Averages over Raw Values Distributions and Medians of Likert Scale Ratings Comparative Likert Scale Ratings

Other Layered Plots

Candlestick Chart Ranged Dot Plot Bullet Chart Layered Plot with Dual-Axis Horizon Graph Weekly Weather Plot Wheat and Wages Example

Multi-View Displays

Faceting (Trellis Plot / Small Multiples)

Trellis Bar Chart Trellis Stacked Bar Chart Trellis Scatter Plot Trellis Histograms Trellis Scatter Plot Showing Anscombe’s Quartet Becker’s Barley Trellis Plot Trellis Area

Repeat & Concatenation

Repeat and Layer to Show Different Weather Measures Vertical Concatenation Horizontally Repeated Charts Interactive Scatterplot Matrix Marginal Histograms Discretizing scales Nested View Concatenation Aligned with Axis minExtent Population Pyramid

Maps (Geographic Displays)

Choropleth of Unemployment Rate per County One Dot per Zipcode in the U.S. One Dot per Airport in the U.S. Overlayed on Geoshape Rules (line segments) Connecting SEA to every Airport Reachable via Direct Flights Three Choropleths Representing Disjoint Data from the Same Table U.S. State Capitals Overlayed on a Map of U.S. Line between Airports in the U.S. Income in the U.S. by State, Faceted over Income Brackets London Tube Lines

Interactive

Interactive Charts

Bar Chart with Highlighting on Hover and Selection on Click Scatterplot with External Links and Tooltips Rectangular Brush Area Chart with Rectangular Brush Paintbrush Highlight Scatterplot Pan & Zoom Query Widgets Interactive Average Multi Series Line Chart with Labels Multi Series Line Chart with Tooltip Isotype Grid Brushing Scatter Plot to show data on a table Selectable Heatmap Bar Chart with a Minimap

Interactive Multi-View Displays

Overview and Detail Crossfilter Interactive Scatterplot Matrix Interactive Dashboard with Cross Highlight Seattle Weather Exploration Connections among Major U.S. Airports.

Community Examples

Here we list great examples of Vega-Lite visualizations that were created by the community. Please help us expand this gallery by forking our example block and sending us a pull request with your example added to this list.