Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making Bar Chart!

Public visualization

Viewing a saved revision (read-only)

3d6d34a6c8e14d88a6adfcf285f734a5

Making Bar Chart!

0 stars0🌍 Public
JJean
Last edited Jan 6, 2020
Created on Jan 4, 2020
Forked from React Starter

This bar chart displays population counts for the ten most populous countries, using horizontal bars ranked from China down to Mexico. The visualization is built with React and rendered as SVG, using d3.scaleLinear for the x-axis population scale and d3.scaleBand for the y-axis country categories. Data is loaded asynchronously via d3.csv from data.csv, with population values multiplied by 1000. The chart appends rectangles to the SVG, with each bar’s width proportional to its population and height set by the band scale’s bandwidth.

AI-generated description

React Starter code.