Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published1🌍 Public
NNikhil Sharma
Last edited Mar 21, 2022
Created on Mar 21, 2022

This bar chart displays population by country for 2015, using a horizontal layout with country names on the y-axis and population on the x-axis, with tooltips showing exact population values on hover. The visualization uses the Vega-Lite API (`vl.markBar()`, `vl.x().fieldN('country')`, `vl.y().fieldQ('population')`) to declaratively build the specification, which is then rendered via Vega-Lite and Vega. Data is loaded from a CSV file using `d3.csv()` from a GitHub gist, and the chart resizes to fit the browser window using width and height bindings.

AI-generated description

Bar Chart using D3 and vega-lite-api

MIT Licensed

Similar vizzes