Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Week 7 – Project Momentum: Color assignment.

Public visualization

Week 7 – Project Momentum: Color assignment.

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed