Activity6Question2
✓ Published0🌍 Public
This example displays a horizontal bar chart of population figures for 20 countries in 2020, using CSV data loaded from a GitHub repository. React renders SVG elements, while D3 v5 handles scales and formatting: `scaleBand` maps countries to y-axis positions and `scaleLinear` maps population values to bar widths. The chart includes formatted tick labels that convert values to billions (e.g., "G" replaced with "B") and native SVG `<title>` elements for tooltips. Reusable React components (`AxisBottom`, `AxisLeft`, `Marks`) structure the visualization.
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