activity 6 task1
✓ Published0🌍 Public
This example displays a horizontal bar chart of the 2020 population for 30 countries, sorted by country name. It uses D3’s `scaleBand` and `scaleLinear` to map the data, which is fetched from a remote CSV file via `d3.csv`. The bars are rendered as SVG rectangles with D3 axes, and a title tooltip shows the abbreviated population value. The code imports D3 functions like `arc`, `pie`, and `max` from the `d3` namespace and leverages React for the UI.
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