Fork of Activity 6_task 1
✓ Published0🌍 Public
This example shows a horizontal bar chart comparing population sizes across 30 countries for the year 2020. The visualization loads data from a CSV file using the `useData` hook and `d3.csv`, then renders the bars with SVG rectangles in a React component. The chart includes labeled axes with formatted tick values using `d3.format`, a title, and a tooltip that displays each country's population on hover. The code demonstrates the integration of React with D3 scales such as `scaleBand` and `scaleLinear`, along with reusable axis and mark components.
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