Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
AAriana
Last edited Jul 23, 2021
Created on Jul 21, 2021

This example shows a horizontal bar chart of the top 10 most populous countries, using data from the United Nations World Population Prospects 2019. The chart is built with React and D3 v5, using `scaleBand` for the y-axis and `scaleLinear` for the x-axis. The `useData` hook loads a CSV via `d3.csv`, slices the first 10 rows, and renders the bars as SVG `<rect>` elements within a React component tree, with separate components for the axes and marks.

AI-generated description

A program that shows the top 10 most populous countries as a bar chart.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes