🌍 Public
Viewing a saved revision (read-only)
9b503688423c4197a0b5b27cb2a6ce70
Activity-6 Task 1
This example displays a horizontal bar chart of population data for 30 countries in 2020, sourced from a CSV file hosted on GitHub. It sorts countries along the y-axis using a band scale, while the x-axis uses a linear scale with SI-prefix formatting to abbreviate large numbers. Built with React and rendered as SVG, the chart creates bars using `rect` elements and provides tooltips via a `title` element. D3 functions like `scaleBand`, `scaleLinear`, and `format` handle the scaling and tick formatting.
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.