Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

DV2_Stacked bar chart

Public visualization

Viewing a saved revision (read-only)

3929c7e50b8949f4a6348e395031d31c

DV2_Stacked bar chart

0 stars0🌍 Public
NNagateja99
Last edited Jul 22, 2023
Created on Jul 22, 2023
Forked from Untitled

This interactive stacked bar chart displays earthquake magnitude data across US states for selected years, with each bar broken into three magnitude-range segments. A dropdown menu switches between years, triggering smooth 750-millisecond transitions that update bar positions, axis scales, and total value labels. The visualization uses D3 v5 with SVG rendering, employing `d3.scaleBand`, `d3.scaleLinear`, `d3.scaleOrdinal`, and `d3.stack` to structure and draw the layers, while `transition().duration()` animates the state changes based on the CSV data.

AI-generated description

Stacked bar chart