Skip to main content
100%

Fork of Simple Bar Chart

✓ Published0🌍 Public
MMartin Guo
Last edited Mar 10, 2024
Created on Mar 10, 2024
Forked from Simple Bar Chart

This example visualizes the top 10 most populous countries as of January 1, 2024, using a horizontal bar chart where bar length encodes population in thousands. It highlights the data source from UN population estimates. The code uses D3’s `scaleBand` and `scaleLinear` for positioning, along with custom axis and label helpers. It filters and sorts the input data, then renders the bars and axes within an SVG container. The chart emphasizes ranking differences while maintaining a clean, readable layout with a gray inner background.

AI-generated description

A bar chart showing the top 10 most populous countries on Earth as of January 1st 2024.

Challenge

  • Fork this viz and modify it to show your own data
MIT Licensed

Similar vizzes