Act 6.2
✓ Published0🌍 Public
A stacked horizontal bar chart compares GDP growth distributions across fourteen countries, with each bar divided into five percentage-range categories. Built with D3 v7, the visualization maps country names to the y-axis using `d3.scaleBand`, GDP percentage ranges to x-axis positions via `d3.scaleLinear`, and color-codes segments by category using `d3.scaleOrdinal`. Data from `data.csv` is loaded and transformed through `d3.stack`, while interactive hover effects display precise GDP percentage values via a tooltip. The SVG output includes labeled axes and a legend, with styling provided by external fonts and CSS.
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