Skip to main content
100%

activity 6_task_2

✓ Published0🌍 Public
Ssairohithchada@gmail.com
Last edited Apr 1, 2025
Created on Apr 1, 2025
Forked from Hello VizHub

This stacked bar chart shows the daily time allocation for five life stages—children, adolescents, young adults, middle-aged, and elderly—across categories such as sleep, work/study, entertainment, outdoor activities, and meditation. Each bar segment represents a category’s duration in minutes, with a tooltip revealing exact values on hover. Built with D3 v7, the visualization uses d3.stack() to aggregate the data, d3.scaleBand() for the y-axis, and d3.scaleLinear() for the x-axis, rendering SVG rectangles. Styling leverages CSS for typography and axis formatting, with a custom tooltip div for interactivity.

AI-generated description
MIT Licensed

Similar vizzes