Skip to main content
100%

d3 intro

✓ Published0🌍 Public
Rrishyossarian
Last edited Jan 15, 2022
Created on Jan 15, 2022
Forked from Stylized Bar Chart

This example displays the top 10 most populous countries as a horizontal bar chart using React and D3 v5. The bars’ lengths are mapped from population values via `d3.scaleLinear`, while the y-axis uses `d3.scaleBand` for country names. It loads data from a United Nations World Population Prospects 2019 CSV file using `d3.csv`. The SVG rendering is split into reusable components: `AxisBottom`, `AxisLeft`, and `Marks`, with tooltips provided through SVG `<title>` elements.

AI-generated description

A program that shows the top 10 most populous countries as a bar chart.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes