🌍 Public
Viewing a saved revision (read-only)
20f2aebf3f2e448f85c98e69bc5f521e
activity 6_Task 1
This interactive horizontal bar chart visualizes the populations of 30 countries for the year 2020, using data loaded from a CSV file hosted on GitHub. Built with React and D3 v5, the visualization renders as an SVG, with each bar’s length proportional to its population value. The code defines custom axis and marks components, leveraging D3’s `scaleBand`, `scaleLinear`, and `format` APIs to manage scales and tick formatting. Hovering over a bar reveals the population value via a tooltip, while the axes are styled with blue tick lines and gray 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.