Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Bar chart

Public visualization

Fork of Bar chart

0 stars0🌍 Public
MMatias Conde
Last edited Oct 3, 2023
Created on Oct 3, 2023

This horizontal bar chart displays the populations of 20 countries in 2020, using United Nations population data. The chart is built with React and D3 v7, where each country’s population is represented by an orange horizontal bar, sorted from largest to smallest. The visualization uses D3’s `scaleBand` and `scaleLinear` to map categorical and numerical data, with SVG `rect` elements for bars and custom axis components. Populations are shown in billions using D3’s `format` function, and tooltips display precise values via SVG `<title>` elements.

AI-generated description

A bar chart with United Nation data

Comments

Sign in to join the discussion.

MIT Licensed