Activity_7
✓ Published0🌍 Public
This example shows a horizontal bar chart of the top 20 countries by 2020 population, using green bars against blue tick marks. The visualization is built with React and D3 v5, employing `scaleBand` for the y-axis, `scaleLinear` for the x-axis, and SVG `rect` elements for the marks. Population values are loaded from a CSV via `d3.csv` and displayed with `d3.format` to abbreviate numbers (e.g., "B" for billions). The chart includes custom axis components and a tooltip using SVG `<title>`.
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