Making a bar chart with D3.js
This example shows a horizontal bar chart of population per country, using data from WorldoMeter. The chart ranks countries from China to Japan by population, with each bar’s length scaled linearly. Built with D3 v5 and React, it renders SVG elements via `select`, `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`. Margins are applied to the SVG, and the bars are appended as `rect` elements with a steelblue fill.