Activity_6 task 1
✓ Published0🌍 Public
This example displays a horizontal bar chart ranking the populations of 30 countries for 2020, with country names on the y-axis and population values on the x-axis. The visualization uses React with D3 v5’s `scaleBand` and `scaleLinear` to position bars, while custom React components render the axes and marks as SVG rectangles. Population data comes from an external CSV file, formatted using D3’s `format` function to display values in billions. Hovering over any bar reveals its exact value through a native SVG `<title>` tooltip.
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