Making a bar chart
✓ Published1🌍 Public
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 descriptionMIT Licensed