🌍 Public
Viewing a saved revision (read-only)
a82f4ff25f96405c969e82828e272885
Activity 6_task 1
This example shows a horizontal bar chart displaying the populations of 20 countries in 2020, with bars colored green and ordered by country name on the y-axis. Using the React framework with D3 v5, the code loads CSV data via `d3.csv`, scales values with `scaleBand` and `scaleLinear`, and renders SVG elements through components like `AxisBottom`, `AxisLeft`, and `Marks`. The x-axis labels use `d3.format` to abbreviate large numbers, converting "G" to "B" for billions, and the dataset is fetched from a GitHub repository.
AI-generated descriptionA demonstration of how to start using D3 version 6.