Activity 6_Task 1
✓ Published2🌍 Public
This example displays a horizontal bar chart of population data for 30 countries in 2020, with green bars and blue axis ticks on an SVG canvas. The React code loads D3 v5 via UNPKG and uses `d3.scaleBand` for the categorical country axis and `d3.scaleLinear` for the population axis. Data is fetched from a CSV file using `d3.csv` and formatted with `d3.format` to abbreviate large numbers. The visualization demonstrates modular ES6 imports for axes and marks, with tooltips showing exact population values 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