Skip to main content
100%

Refactoring a Bar Chart

✓ Published0🌍 Public
JJacob Potvin
Last edited May 26, 2021
Created on May 24, 2021

This example displays the top 10 most populous countries as horizontal bars, using population data from the United Nations World Population Prospects 2019. The React app loads the CSV with d3.csv and renders bars with SVG rect elements, scaling positions with d3.scaleBand and d3.scaleLinear. It also generates rudimentary axis ticks via d3.scaleLinear’s ticks method, despite lacking full axis labels or gridlines.

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.

MIT Licensed

Similar vizzes