activity 6_task_2
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.