fork of Finishing Touches
This visualization shows a 100% stacked bar chart of sleep disorder prevalence across stress levels, using data from a sleep health and lifestyle dataset. The chart displays the proportion of people with no disorder, insomnia, or sleep apnea, with a gray and two blue color scheme to distinguish healthy from disordered sleep. Users can filter by gender and view only disorder categories through dropdown menus, while hovering reveals exact percentages via a tooltip. The implementation uses D3 v7 with d3.stack, d3.scaleOrdinal, and d3.axisBottom/Left to render the SVG with interactive animation.
AI-generated descriptionWeek 12 — Finishing Touches (Polished Update)
This week I focused on final cleanup instead of adding new charts. I updated the color scheme so “None” is a neutral gray and both disorder categories (Insomnia + Sleep Apnea) use related blues, which makes the healthy vs disordered grouping clearer. I also improved the subtitle and axis labels to mention the original 1–10 stress scale. A new View dropdown was added (All categories / Disorders only) so users can quickly focus on just Insomnia and Sleep Apnea. I refined legend spacing, added a small legend note (“Healthy: None · Disordered: Insomnia + Sleep Apnea”), and adjusted layout so everything fits neatly on screen. Overall, the chart is cleaner, easier to read, and highlights the patterns much better.