Activity_6_Tutorial 1
✓ Published0🌍 Public
This example displays a horizontal bar chart of the top 30 countries by 2020 population, with each bar labeled by country name and colored light green. The visualization uses React with D3 v5, leveraging `d3.csv` to load data from a GitHub-hosted CSV, `scaleBand` and `scaleLinear` for positioning, and native SVG elements for rendering. Custom axis components format tick labels using D3's `format` helper, converting values to abbreviated “B” units, while tooltips show the formatted population 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.
MIT Licensed