🌍 Public
Viewing a saved revision (read-only)
3f9fa2ef0ac04ac384b7be99bebbfc61
activity6_task 1
This example shows a horizontal bar chart of population figures for 30 countries in 2020, with a green bar for each country and a blue axis grid. The visualization uses React to render SVG elements, with D3 v5’s `scaleBand` and `scaleLinear` to map country names and population values to positions. The bar lengths encode the population data, which is loaded from a remote CSV via D3’s `csv` method, and a native SVG `<title>` element provides tooltips on hover. Axis labels are formatted using D3’s `format` helper to abbreviate large numbers.
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.