Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored Barchart

Public visualization

Viewing a saved revision (read-only)

f496d1059e094c169487ba6455a9a1dd

Refactored Barchart

0 stars0🌍 Public
Eevers-codeshop-ai
Last edited Jun 20, 2021
Created on Jun 20, 2021

This example displays the top 10 most populous countries as a horizontal bar chart, with country names on the y-axis and population values along the x-axis. The visualization uses React components with D3’s `scaleBand` and `scaleLinear` to position bars and ticks, rendering SVG elements directly. Data comes from the United Nations World Population Prospects 2019 CSV, loaded via D3’s `csv` function and sorted to the first ten rows. The chart includes an `AxisBottom` component that maps tick values to x-coordinates.

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.