🌍 Public
Viewing a saved revision (read-only)
b39a0f8c916c4c529081288e707a2b62
Bar Chart with Beautified Axes
This example shows a horizontal bar chart of population figures for the ten most populous countries, sorted by value with a linear x-axis and banded y-axis. The code uses D3 v5’s `csv` loader to parse the data, `scaleLinear` and `scaleBand` for positioning, and `axisLeft`/`axisBottom` for tick marks. Axis labels are formatted with `format(".2s")` to abbreviate large numbers, and the SVG is rendered directly with appended `rect` elements.
AI-generated description