🌍 Public
Viewing a saved revision (read-only)
bbc82c6540be4b3396dfc0e6c111dec9
Activity_6_Question1.2
This example shows a horizontal population bar chart for 20 countries using 2010 data, with bars colored light green and axes labeled in blue. The visualization uses React to render SVG elements, with D3 v5 APIs including `scaleBand` and `scaleLinear` to map categorical and quantitative data. The `csv` function loads data from a GitHub-hosted CSV file, while custom `AxisBottom` and `AxisLeft` components generate ticks. Each bar includes a native SVG `<title>` tooltip displaying formatted population values using D3's `format` 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.