Skip to main content
100%

Week 7 – Project Momentum: Color assignment.

✓ Published1🌍 Public
Ccsabavath@wpi.edu
Last edited Oct 20, 2025
Created on Oct 20, 2025

This visualization presents a 100% stacked bar chart showing the distribution of sleep disorders (None, Insomnia, Sleep Apnea) across three stress-level bins (Low, Medium, High), with a dropdown filter for gender. Built with D3 v7, it uses `d3.scaleOrdinal` for color assignment, `d3.stack` for stacking, and SVG rendering with animated transitions via `transition().duration(400)`. The chart dynamically updates its title to reflect the selected gender and sample count, drawing from the Sleep Health & Lifestyle dataset.

AI-generated description
MIT Licensed

Similar vizzes