Skip to main content
100%

Making a bar chart

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

Similar vizzes