Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Week 7 – Project Momentum: Color assignment.

Public visualization

Viewing a saved revision (read-only)

f2cdd46a7f7f40ed9d61bf647f0660ca

Fork of Week 7 – Project Momentum: Color assignment.

0 stars1🌍 Public
Ccsabavath@wpi.edu
Last edited Oct 20, 2025
Created on Oct 20, 2025

This visualization displays the prevalence of sleep disorders (None, Insomnia, Sleep Apnea) as a 100% stacked bar chart, segmented by binned stress levels (Low, Medium, High) and filterable by gender. A legend allows users to toggle categories on or off, with hover and click interactions updating the display. The chart uses D3 v7’s `d3.stack()`, `d3.scaleBand()`, and `d3.scaleOrdinal()` to compute and color the proportional segments, with smooth transitions applied to bar heights via `transition().duration()`. Data comes from a CSV file on sleep health and lifestyle.

AI-generated description