Making a bar chart
✓ Published1🌍 Public
This example shows a horizontal bar chart of population data for the ten most populous countries, drawn as SVG rectangles scaled by population and ordered by country name. It uses D3 v7’s `scaleLinear` for the x-axis, `scaleBand` for the y-axis categories, and `axisLeft` and `axisBottom` to render ticks. The chart loads data from `data.csv` via `d3.csv`, converts population values to numbers, and appends the rectangles with a fixed steelblue fill.
AI-generated descriptionT
MIT Licensed