🌍 Public
Viewing a saved revision (read-only)
a50365fe939c499d9ba8852bca6fe985
activity 6_Task_1
This visualization displays the populations of ten countries in the year 2000 using a horizontal bar chart, sourced from a CSV file. Built with React and D3 v5, it renders chart elements as SVG components, including bottom and left axes. The code employs D3's `scaleBand` and `scaleLinear` to map data to positions, while custom React components (`AxisBottom`, `AxisLeft`, `Marks`) structure the visualization. Population values are formatted using D3's `format` API, converting large numbers into abbreviations like “1.2B”.
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.