Making a bar chart
✓ Published0🌍 Public
A horizontal bar chart displays population estimates for the ten most populous countries, with bars extending left-to-right from a shared origin. The visualization uses D3 v5’s `scaleLinear` for bar widths and `scaleBand` for country labels along the y-axis. Data is loaded from a CSV file via `d3.csv`, and each population value is multiplied by 1,000 before rendering. The resulting SVG bars are appended using `selectAll` and `enter().append('rect')`, with fill colors left at their default black.
AI-generated descriptionMIT Licensed