🌍 Public
Viewing a saved revision (read-only)
123fd42094bf488bb0a650b9d10e0fc2
Fork of Fork of Activity 6_Task 1
This example shows a horizontal bar chart of population totals for 30 countries in 2020. The chart uses React to render SVG elements, with D3’s `scaleBand` and `scaleLinear` mapping country names to bar positions and population values to bar widths. Axes are generated by custom React components (`AxisBottom`, `AxisLeft`) that call `xScale.ticks()`. Tooltips appear via SVG `<title>` elements, and population data is loaded from a remote CSV using D3’s `csv` function.
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.