Skip to main content
Public

Share visualization

Loading preview…

Vega-Lite API Template

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Vega-Lite API Template

15
CCurran Kelleher
Last edited Sep 5, 2019
Created on Sep 5, 2019

This example displays the population of countries in 2015 as horizontal bars, ranked from largest to smallest, with the countries on the x-axis and their population on the y-axis. Built with the Vega-Lite API, it dynamically loads data via `d3.csv` from a remote gist and renders the chart using Vega-Lite’s SVG renderer. The code customizes the axis and tooltip appearance through a configuration object, and it uses `vega-tooltip` for interactive hover details. The visualization adapts its width and height to the window size with an autosize fit.

AI-generated description

A visualization constructed using the vega-lite-api.

Comments

Sign in to join the discussion.

MIT Licensed