Skip to main content
Public

Share visualization

Loading preview…

Final Stacked Bar Chart with HTML and movable filter

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Final Stacked Bar Chart with HTML and movable filter

2
BBismark Kofi Owusu Sarfo
Last edited Nov 22, 2025
Created on Nov 22, 2025

This interactive D3.js v7 visualization presents a stacked bar chart of BMW model sales volumes by model and year. Users can filter the view through a movable dropdown menu to highlight either the highest or lowest selling model. The SVG-based chart uses `d3.rollups` for data aggregation, `d3.stack` for stacking, and `d3.scaleBand`/`d3.scaleLinear` for axes, with a color-coded scheme (`d3.schemePaired`) distinguishing years. Hovering over individual bar segments reveals a tooltip with detailed sales data, while clicking a segment dims the rest of the chart.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed