Skip to main content
100%

Refactored Bar Chart

✓ Published0🌍 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.

MIT Licensed

Similar vizzes