Skip to main content
100%

17. Refactored Bar Chart

✓ Published0🌍 Public
PPrashish Paudel
Last edited Mar 31, 2021
Created on Mar 31, 2021

This example displays the top 10 most populous countries as horizontal bars, with population on the x-axis and country names on the y-axis. The chart is rendered as an SVG using React components that leverage d3’s `scaleBand` and `scaleLinear` for axis scaling. The `AxisBottom` and `AxisLeft` components render tick marks and labels, while the `Marks` component draws the rectangles. Data is loaded asynchronously from the United Nations World Population Prospects 2019 CSV via d3’s `csv` function.

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