Skip to main content
100%

Fork of Fork of Pathetic Bar Chart

✓ Published1🌍 Public
MMohammed Banani | MbDev
Last edited May 6, 2022
Created on May 6, 2022

This example displays the top 10 most populous countries as a bar chart with no axes, using React hooks and D3 v5. It loads population data from a CSV file hosted on GitHub, sourced from the United Nations World Population Prospects 2019. The visualization uses `d3.csv` to fetch and parse data, `d3.scaleBand` for the y-axis positioning, and `d3.scaleLinear` for the x-axis scaling. Rendered as SVG, it includes gridlines and tick labels from `xScale.ticks()`, with bars drawn as `<rect>` elements and country names as `<text>` labels.

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