🌍 Public
Viewing a saved revision (read-only)
c1901f2af4b8419d8d94ffaef8fbd015
Stacked-bar with own data
A stacked bar chart visualizes the total distance of physical activities per year, with bars segmented by sport type (Run, Ride, Walk, and Hike combined). The chart uses an SVG rendering pipeline with D3 v7’s `d3.csv` for data loading, `d3.group` and `reduce` for aggregation, and `d3.stack` to compute stack offsets. Axes are generated with `d3.axisBottom` and `d3.axisLeft`, while a categorical `d3.scaleOrdinal` assigns colors to the four activity categories. The data originates from a personal fitness tracking CSV, with distances converted from meters to kilometers.
AI-generated descriptionexample copied from d3-graph-gallery