Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Styled Bar chart with Axes

Public visualization

Styled Bar chart with Axes

0 stars1🌍 Public
KKirsten Lund
Last edited Feb 15, 2021
Created on Feb 15, 2021

This example displays a horizontal bar chart of the top 10 most populous countries using 2020 UN population data, loaded via `d3.csv`. The chart renders custom axes with `scaleBand` for countries and `scaleLinear` for population values, drawing tick marks and labels directly. Built with React and D3 v6, it uses SVG elements like `rect` and `text` inside a transformed group to position bars and labels, with margins applied for layout.

AI-generated description

Bar chart using world population data - D3 & React.

<!-- <iframe width="560" height="315" src="https://www.youtube.com/embed/JMvnd1CIRNo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> -->

Comments

Sign in to join the discussion.

MIT Licensed