🌍 Public
Viewing a saved revision (read-only)
73516e1f013d4cfbaf953c555fc7b28a
Fork of Activity 7
This example visualizes population data for 20 countries in 2020 using horizontal bars, with country names on the y-axis and population values on the x-axis, formatted in billions. The visualization reads data from a CSV file via D3’s `csv` function, applies a `scaleBand` for country categories, and a `scaleLinear` for population values. React components render SVG elements, with `AxisBottom` and `AxisLeft` generating ticks, and `Marks` producing rectangles with `<title>` tooltips. The code uses D3 v5 and React 16.9.
AI-generated descriptionA demonstration of how to start using D3 version 6.