Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Making a bar chart

0 stars1🌍 Public
JJohn Hamilton Bradford
Last edited Oct 24, 2018
Created on Oct 23, 2018

A horizontal bar chart shows population sizes for ten countries, with bars ordered alphabetically by country name and colored steelblue. The visualization loads data from a CSV file using `d3.csv`, converts population values to numbers, and scales the bars with `d3.scaleLinear` and `d3.scaleBand`. Axes are rendered with `d3.axisLeft` and `d3.axisBottom` inside an SVG container. The code imports specific D3 v5 functions and manually appends rectangles to represent each bar.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed