Skip to main content
100%

dv.23 - refactored bar chart

✓ Published1🌍 Public
Zzach b.
Last edited Mar 18, 2021
Created on Nov 3, 2020

This example shows the top 20 most populous countries as horizontal bars, with country names on the left axis and population values on the bottom axis. The React app loads CSV data from the UN World Population Prospects 2019, sorts by 2020 population, and renders SVG rectangles using d3.scaleBand for the y-axis and d3.scaleLinear for the x-axis. Axis labels and tick marks are generated by custom React components that use d3 scale methods to position text and lines. The chart updates automatically when the data loads asynchronously via d3.csv.

AI-generated description

A program that shows the top 20 most populous countries with axes and labels.

Data: United Nations World Population Prospects 2019.

--
Datavis 2020 #23

MIT Licensed

Similar vizzes