Skip to main content
100%

Fork of Refactored Bar Chart

✓ Published0🌍 Public
LLove Wessman
Last edited Jan 20, 2022
Created on Jan 20, 2022

This example visualizes the top 10 most populous countries using horizontal bars, with the country names on the y-axis and population values mapped to bar lengths along the x-axis. The chart is rendered as SVG using React, with D3’s `scaleBand` and `scaleLinear` handling the axes and scaling. Custom React components (`AxisBottom`, `AxisLeft`, `Marks`) generate the tick marks and rectangles, while D3’s `csv` loads data from the United Nations World Population Prospects 2019 dataset. The chart includes axes with tick labels, improving readability over a bare bar display.

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