Activity6_Task1.1
✓ Published0🌍 Public
This example shows a horizontal bar chart of population data for 20 countries in 2010, using a linear scale for population values and a band scale for country names. The visualization renders as SVG through React components, with D3 v5 handling data loading via `d3.csv` and scale generation through `scaleLinear` and `scaleBand`. The code defines reusable React components for the bottom and left axes plus marks, and formats population values using D3's `format` function. Data comes from a GitHub-hosted CSV file, with each bar including a native SVG tooltip showing the formatted population value.
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