Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Refactored Bar Chart

Public visualization

Viewing a saved revision (read-only)

fb9e85d0784e4257a8bec94fb9681a11

Fork of Refactored Bar Chart

0 stars0🌍 Public
RReymond Mesuga
Last edited Mar 17, 2021
Created on Mar 17, 2021

This example displays the top 10 most populous countries as horizontal bars using React and D3 v5. It loads UN World Population Prospects 2019 data via d3.csv, sorts by 2020 population, and renders SVG rectangles with d3.scaleBand, d3.scaleLinear, and d3.max. The component structure separates axis and mark rendering into reusable functions, with d3.ticks generating the bottom axis labels and scaleBand domains for the left axis.

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.