🌍 Public
Viewing a saved revision (read-only)
e7e1ac2467d04be8a2d2876a0c1e879f
Activity6_task1
This example displays a horizontal bar chart of the top 30 countries by 2020 population. The visualization uses the D3 version 5 library with `scaleBand` and `scaleLinear` to map data from a CSV file to SVG rectangles. The React component defines axes with `AxisBottom` and `AxisLeft`, formatting tick labels from scientific notation to billions. Each bar includes a tooltip showing the population value, with data loaded asynchronously via a custom `useData` hook that fetches from a GitHub repository.
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.