Making a barchart
✓ Published0🌍 Public
A horizontal bar chart displays population figures for major global cities, sorted alphabetically by city name. The visualization uses D3 v5 with SVG rendering to draw steel-blue bars whose widths represent each city's population value. It employs `d3.csv` to load the data, `scaleLinear` and `scaleBand` for positioning, and `axisBottom` with a custom tick formatter that abbreviates numbers using SI prefixes converted from G to B. The chart includes a title and removes extraneous domain lines from the categorical y-axis.
AI-generated descriptionAn example including some commonly used features of SVG.
MIT Licensed