Skip to main content
100%

Making a bar chart

✓ Published3🌍 Public
SSamuel Elbaz
Last edited Oct 28, 2019
Created on Oct 28, 2019
Forked from Lets Make a Face

This example shows a horizontal bar chart ranking the ten most populous countries, with population values scaled along the x-axis and country names on the y-axis. It loads data from a CSV file and renders the bars as SVG rectangles using D3 v5’s `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` APIs. The bars are styled with a steelblue fill via CSS, and axes labels are positioned with margins for readability.

AI-generated description
MIT Licensed

Similar vizzes