Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's Make a Bar Chart

Public visualization

Let's Make a Bar Chart

0 stars0🌍 Public
BBlakeMcMurray
Last edited Jan 21, 2021
Created on Jan 20, 2021
Forked from Hello VizHub

This example demonstrates a horizontal bar chart of population data for the ten most populous countries, using SVG rectangles scaled proportionally to each country’s population. The visualization imports `csv`, `scaleLinear`, and `scaleBand` from d3 to parse the data and map values to width and band positions. The code loads data.csv, converts population numbers by multiplying by 1000, and appends rectangles to the SVG canvas with widths driven by the linear scale.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed