Skip to main content
100%

Let's Make a Bar Chart

✓ Published0🌍 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
MIT Licensed

Similar vizzes