Making a Bar Chart
✓ Published3🌍 Public
This example shows a horizontal bar chart ranking the populations of the ten most populous countries, with country names on the y-axis and population values on the x-axis. It uses D3 v5’s `scaleLinear` and `scaleBand` to map data to pixel positions, `axisLeft` and `axisBottom` for ticks, and SVG `rect` elements filled with steelblue. The data is loaded from a local CSV file via `csv`, with population values multiplied by 1000 to reflect actual counts.
AI-generated descriptionMIT Licensed