🌍 Public
Activity6_Task2
This stacked bar chart visualizes GDP growth rates across six countries, segmented into five ranges from “below 6.0” to “above 10.5.” Each bar represents a country, with colored segments proportional to the share of growth in each range. The visualization uses D3 v7’s `d3.stack()` to aggregate the data, `d3.scaleBand()` for the country axis, and `d3.scaleLinear()` for the value axis. Hovering a segment reveals its exact percentage via a custom tooltip, while the SVG rendering and ordinal color scale highlight category differences.
AI-generated descriptionMIT Licensed
Comments
Sign in to join the discussion.