Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Task2

Public visualization

Viewing a saved revision (read-only)

dae51cd79ea54856a0d33850bea2bc7d

Activity6_Task2

0 stars0🌍 Public
Vvidiyalasahithi1999@gmail.com
Last edited Apr 15, 2024
Created on Apr 15, 2024
Forked from article Starter

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 description