Skip to main content
100%

Refactored Bar Chart

✓ Published78🌍 Public
CCurran Kelleher
Last edited Dec 21, 2020
Created on Sep 18, 2019

This example shows the top 10 most populous countries from the United Nations World Population Prospects 2019 dataset as horizontal bars, with axes displaying country names and population values. The visualization uses React 16.9 and D3 v5, rendering SVG through React components. D3’s `scaleBand` and `scaleLinear` map the data to positions, while custom `AxisBottom` and `AxisLeft` components generate tick marks and labels. The `useData` hook loads the CSV and truncates it to ten rows before rendering the rectangles.

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