Activity6_Task1
✓ Published0🌍 Public
This example shows a horizontal bar chart of population data for 30 countries in 2020, with each bar labeled by country name and sized proportionally to its population value. The visualization is rendered as an SVG using React components, with D3’s `scaleBand` and `scaleLinear` handling the axis scales and D3’s `format` function converting tick labels to abbreviated units like “B” for billions. Data is loaded asynchronously from a CSV file using D3’s `csv` method, and the chart includes interactive tooltips via SVG `<title>` elements that display 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