Skip to main content
100%

Making a bar chart

✓ Published1🌍 Public
Aanastasiiaplatovskikh
Last edited May 25, 2020
Created on May 25, 2020
Forked from Face with D3.js

This example shows a horizontal bar chart of the ten most populous countries, ordered by population. It uses D3 v5’s `scaleLinear` and `scaleBand` to map population values and country names to SVG rectangles, with `axisLeft` and `axisBottom` for axes. Population data is loaded from a CSV file and formatted in billions using `format('.3s')`. The chart includes a title and axis labels, with the x-axis gridlines extending across the plot area.

AI-generated description
MIT Licensed

Similar vizzes