Activity 6_Question 1.2
✓ Published0🌍 Public
This example displays a horizontal bar chart of population data for 20 countries in 2010, using React with SVG rendering. The visualization imports D3 v5 modules for data loading and scales: `scaleBand` positions country categories along the y-axis, while `scaleLinear` maps population values to bar widths on the x-axis. CSV data is fetched from a GitHub-hosted dataset and formatted using D3’s `format` function. Axes are custom React components, and each bar includes a native SVG `<title>` element for tooltip support. The styling uses CSS classes for marks and ticks.
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