task-8(1.2)
✓ Published0🌍 Public
This example displays a horizontal bar chart of the top 10 countries by population in 2010, sorted along the y-axis with bars proportional to population values. It uses React with D3 v5’s `scaleBand`, `scaleLinear`, `max`, and `format` APIs to compute scales and tick labels, rendering SVG elements via reusable components like `AxisBottom`, `AxisLeft`, and `Marks`. Data loads asynchronously from a CSV URL using `d3.csv`, and each bar includes a native SVG `<title>` tooltip showing the formatted population.
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