🌍 Public
Viewing a saved revision (read-only)
65a06c9591dd437eb08c97a835ca7ec6
Activity 6 Task 1
This visualization displays the population of 30 countries in 2020 using a horizontal bar chart rendered as SVG in React. It imports D3 v5 utilities such as `scaleBand`, `scaleLinear`, `max`, and `format` to map country names to bar heights and population values to bar widths. The chart includes labeled axes, with the y-axis listing countries and the x-axis showing formatted population values (e.g., "1.2B") via a custom tick format. Data is loaded asynchronously from a remote CSV using the `csv` function, and tooltips appear on each bar via a native `<title>` element.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.