🌍 Public
Viewing a saved revision (read-only)
9c84214d81ab42d485f0dbc8065315cb
pqb
This example shows a horizontal bar chart of population data for ten countries, with each bar’s length proportional to its population and countries labeled along the vertical axis. The visualization uses D3 v5’s `scaleLinear` and `scaleBand` to map population values and country names to SVG rectangles, while `axisLeft` and `axisBottom` generate the corresponding axes. Data is loaded from a CSV file containing country and population columns, with population values converted from thousands to absolute numbers before rendering. The React framework wraps the D3 code, producing an SVG output within a 960×500 viewport.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.