Activity 7
✓ Published0🌍 Public
This is a horizontal bar chart built with React and SVG, displaying the population figures of the top 20 countries for the year 2020. The data is loaded from a remote CSV file using D3’s `csv` function, and the chart scales the bars with `scaleLinear` and `scaleBand`. The visualization includes custom axes (`AxisBottom` and `AxisLeft`), tick marks styled in blue, and green bars. Hovering over a bar reveals a tooltip with the formatted population value, using D3’s `format` to abbreviate large numbers.
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