Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Stacked Bar Chart with HTML and movable filter

Public visualization

Stacked Bar Chart with HTML and movable filter

0 stars1🌍 Public
BBismark Kofi Owusu Sarfo
Last edited Nov 22, 2025
Created on Nov 22, 2025

This example shows a stacked bar chart of BMW model sales by year, where each bar segment represents a model's sales volume. A movable filter panel lets the user highlight the model with the highest or lowest total sales, dimming all other segments for comparison. Built with D3 v7, it uses `d3.rollups` to aggregate the CSV data by year and model, `d3.stack` for stacking, `d3.scaleBand` and `d3.scaleLinear` for axes, and SVG rendering for interactive bars with tooltips.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed