🌍 Public
Viewing a saved revision (read-only)
e611313680384da9aa781466f0fde7cc
d3 bar chart
This example presents a horizontal bar chart of population figures for ten countries, using data from a CSV file where values are scaled by ten thousand. The visualization ranks countries from China to Mexico by their population, with each bar’s length proportional to its value. Built with D3 v5, the code uses `d3.csv` for data loading, `scaleLinear` and `scaleBand` for positioning, and `axisLeft` and `axisBottom` to render axes. Bars are drawn as SVG rectangles with a steelblue fill, appended to a group translated by specified margins.
AI-generated description