Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactoring Bar Chart

Public visualization

Viewing a saved revision (read-only)

9be12bbd8c2b4663b6b7f1ef78e43603

Refactoring Bar Chart

0 stars0🌍 Public
CChiedu Egbumokei Jr
Last edited Jan 1, 2022
Created on Jan 1, 2022

This example visualizes the top 10 most populous countries as a horizontal bar chart, using population data from the United Nations World Population Prospects 2019. The visualization renders bars via SVG `<rect>` elements, with axes built from D3 v5 scales (`scaleBand` and `scaleLinear`) and React components for the axes and marks. The code also includes a custom tooltip via an SVG `<title>` element and uses D3’s `csv` loader to fetch the data.

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.