Skip to main content
100%

Fork of Olympic Data stacked Bar Graph

✓ Published6🌍 Public
EElena Momtcheva
Last edited Apr 8, 2024
Created on Apr 8, 2024

This example shows Olympic medal counts for countries as a horizontal stacked bar chart, with Gold, Silver, and Bronze segments colored using a d3 ordinal scale. Hovering over a legend item highlights that medal type in the bars while fading others. The visualization uses d3.stack for data transformation, d3.scaleBand and d3.scaleLinear for axes, and custom mouseenter/mouseleave handlers to update a hovered state, re-rendering the chart with adjusted opacity and stroke.

AI-generated description
MIT Licensed

Similar vizzes