🌍 Public
Viewing a saved revision (read-only)
310c3b35bcfe4a69b2d2189129b98d1e
activity 6_Task 1
This visualization displays the populations of 20 countries in 2010 as a horizontal bar chart, using React and D3 v5 to render the SVG elements. It loads data from a CSV file via a custom `useData` hook with `d3.csv`, then uses `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis. The bars are drawn as SVG `<rect>` elements with a native `<title>` tooltip showing formatted population values, and tick marks are generated using `xScale.ticks()` with custom formatting.
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.