Skip to main content
100%

Mergins and Axes

✓ Published0🌍 Public
Hhung2606
Last edited Oct 14, 2021
Created on Oct 14, 2021

This example visualizes the top 10 most populous countries using a bar chart built with React and SVG. The chart displays horizontal bars representing each country’s 2020 population, with tick marks and labels for the x-axis scale and country names on the y-axis. Data comes from the United Nations World Population Prospects 2019, loaded via `d3.csv`. The code uses `scaleBand` and `scaleLinear` from D3 v5 to compute positions, while margins and inner dimensions are manually defined to align axes correctly.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes