🌍 Public
Viewing a saved revision (read-only)
3c41a2c2d613401a92b6d27c6584742f
Task 1
This chart displays the population of 30 countries in 2020, sorted along the y-axis with a horizontal bar for each country whose length corresponds to its population. Built with React and D3 v5, the visualization uses `scaleBand` for the categorical country axis and `scaleLinear` for the continuous population axis, rendering SVG rectangles for the bars. The data is fetched via D3’s `csv` function, and tick labels on the x-axis are formatted using `d3.format`. Blue axis lines and green bars are styled through CSS, with tooltips showing each value on hover.
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.