🌍 Public
Viewing a saved revision (read-only)
f67271f4bc4446cca3704bbbd8d647ec
Activity_6 Q2
A horizontal bar chart ranks 30 countries by their 2020 population, using light green bars with blue tick marks and gray labels on a white SVG canvas. The React app loads data from a CSV URL via `d3.csv`, maps the population values, and renders the chart with `d3.scaleBand` and `d3.scaleLinear` scales. The x-axis formats tick values using `d3.format` to abbreviate large numbers, converting G to B, while tooltips show the formatted population on hover. The layout uses fixed margins and a bottom axis label "POPULATION-2020," leveraging D3 v5 within a React component structure.
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.