🌍 Public
Viewing a saved revision (read-only)
31dcd38c6f71478c8b33b8f655c754c3
Activity 6_question 1.2
A horizontal bar chart displays the 2010 populations of twenty countries, sorted by country name, using green bars on a white SVG canvas. The visualization is built with React and D3 v5, using `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis. Population data is loaded from a remote CSV file via `d3.csv`, with tick labels formatted using `d3.format` to abbreviate billions. Axis lines are styled blue, and the chart includes a labeled x-axis and tooltips showing the abbreviated population value for each bar.
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.