🌍 Public
Viewing a saved revision (read-only)
d13c1c64a41b43d7bbd17f7d4af9cd28
test
This example displays the top 10 most populous countries as horizontal bars, with country names on the y-axis and a numeric score on the x-axis. Built with React and rendered as SVG, it uses D3 v5’s `scaleBand` for the categorical axis, `scaleLinear` for the value axis, and `csv()` to load data from the World Happiness 2021 dataset. The `Marks` component generates rectangles with tooltips, while custom `AxisBottom` and `AxisLeft` components handle tick labels and grid lines.
AI-generated descriptionA program that shows the top 10 most populous countries as a bar chart.