Activity6_Task1
✓ Published4🌍 Public
This example displays a horizontal bar chart of the 2010 populations for 20 countries, sorted by country name and rendered as SVG in a React application. The chart uses D3 v5 scales—`scaleBand` for the y-axis and `scaleLinear` for the x-axis—with data loaded via `d3.csv` from a GitHub-hosted CSV file. Bars are drawn as `rect` elements with tooltips formatted using D3’s `format` function, while the `AxisBottom` and `AxisLeft` components generate their respective tick marks and labels.
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