Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

activity 6 task2

Public visualization

activity 6 task2

0 stars0๐ŸŒ Public
Bbrahmateja.edu2023@gmail.com
Last edited Apr 11, 2024
Created on Apr 11, 2024

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 description

Comments

Sign in to join the discussion.

MIT Licensed