🌍 Public
Viewing a saved revision (read-only)
495af458a6894a72a7632549c6f60432
D3.js
This example shows a horizontal bar chart of the ten most populous countries, using population data loaded from a CSV file. The chart renders as SVG within a React framework, with D3 v5 handling the scales and axes via `scaleLinear` and `scaleBand`. The code imports specific functions from the `d3` package, including `csv`, `max`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, to position the bars and axis labels. Each bar’s width corresponds to its population value, scaled against the maximum population in the dataset.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.