Activity 6 task2
✓ Published0🌍 Public
This stacked bar chart shows the racial composition of ten U.S. states, with each horizontal bar segmented into Asian, Black, and White population percentages. The visualization uses D3 v7’s stacking API (`d3.stack`) to layer the three categories, with a linear x-scale for percentages and a band scale for states. Hovering or clicking a segment reveals its exact percentage via an interactive tooltip, while inline labels display each segment’s value. The SVG rendering includes axes formatted as percentages, and the color scale assigns distinct hues to each racial group. The data is hardcoded as an array of state objects.
AI-generated descriptionMIT Licensed