Clickable Stacked Bar Chart with HTML
✓ Published1🌍 Public
This stacked bar chart shows BMW sales volumes by year, broken down by region, with each segment colored according to its region. The visualization is built using D3 v7 with SVG rendering, and it also includes a clickable legend. Clicking a legend item or a bar segment toggles the highlight for that region, turning the selected elements white. The chart loads data from a CSV file and aggregates sales volumes using `d3.rollups` and `d3.sum`, with axes and grid lines configured via `d3.axisBottom` and `d3.axisLeft`.
AI-generated descriptionMIT Licensed