🌍 Public
Viewing a saved revision (read-only)
75b1aa49a6e54fdaac47601d7b54be15
Activity 6_Task 1
This interactive bar chart displays the population figures for 30 countries in 2020, with country names on the y-axis and population on the x-axis. Built with React and D3 v5, it uses `scaleBand` and `scaleLinear` to map the data, rendering SVG rectangles via the `Marks` component. The chart features custom tick marks and labels, with population values formatted using `d3.format(‘.2s’)` and converted to billions. The data is loaded from an external CSV file using D3’s `csv` function, and tooltips show the precise population on hover.
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.