🌍 Public
Viewing a saved revision (read-only)
73b1d2cb687245bc9cc8cb598cd7f90b
BarChartTest
This example shows the population of countries and territories worldwide using a horizontal bar chart rendered as SVG. Each bar’s length encodes the population value, scaled linearly from zero to the maximum, while the vertical positions of bars are determined by a band scale across country names. The visualization is built entirely with D3 v5 APIs, including `scaleLinear`, `scaleBand`, `csv`, and `select`, and it draws rectangles directly via `svg.selectAll('rect')`. Data is loaded from a CSV file, with population figures multiplied by 1000 before rendering.
AI-generated description