Activity 6 question 1.1
✓ Published0🌍 Public
This example shows a horizontal bar chart of population by country, with the year 2000 displayed in the x-axis label. It uses React with D3 v5 functions such as `scaleBand`, `scaleLinear`, `max`, and `format` to construct the visualization. The data is loaded from a CSV file using D3’s `csv` method, filtered to the top ten countries, and rendered as SVG rectangles. Interactive tooltips appear on hover via the SVG `title` element, while styled axis lines and labels enhance readability.
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