Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart Population

Public visualization

Viewing a saved revision (read-only)

c623bb74c63b42d8864331f7d7f7f302

Bar Chart Population

0 stars0🌍 Public
Nnahsiloh
Last edited Apr 25, 2021
Created on Apr 25, 2021

This interactive bar chart displays the top 10 most populous countries in 2020 according to UN population data. It uses React state to hold the CSV-loaded data and renders the visualization as an SVG. The chart implements D3's `scaleBand` for the categorical country axis and `scaleLinear` for the population axis, with axes drawn from D3's `ticks()` method. Rectangles represent each country's population, sized using the computed scales within a defined margin layout.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.