Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored Bar Chart

Public visualization

Viewing a saved revision (read-only)

6f4732f90c6c4010b949160a73fdf856

Refactored Bar Chart

0 stars0🌍 Public
Aamiteshwarr
Last edited Jan 19, 2023
Created on Jan 19, 2023

This example presents the top 10 most populous countries as a horizontal bar chart, with country names on the y-axis and population values on the x-axis, sourced from the United Nations World Population Prospects 2019. The visualization is built with React and D3 v5, using `scaleBand` and `scaleLinear` to position bars and axes, while SVG `<rect>` elements render the marks. The code separates concerns into reusable components for the bottom axis, left axis, and marks, and loads data asynchronously via D3’s `csv` parser.

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.