🌍 Public
Viewing a saved revision (read-only)
0f3a9a93ef984f39b71b4f5af5990415
activity 6 task2
This visualization shows the GDP growth rates of six countries, broken down into five distinct growth-rate categories. The chart uses a stacked horizontal bar layout, with each bar representing a country and segmented by its growth-rate proportions. The code uses D3 v7 to create the SVG visualization, employing `d3.stack()` to generate the stacked data structure, `d3.scaleBand()` for the country axis, and `d3.scaleLinear()` for the growth-rate scale. Interactive tooltips display the exact percentage for each segment on mouseover, using D3 event handlers and HTML div elements.
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.