Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Infection Type Chart

Public visualization

Infection Type Chart

0 stars2🌍 Public
LLex
Last edited Jul 19, 2020
Created on Apr 9, 2020
Forked from Untitled

This stacked bar chart displays COVID-19 infection cases across Chinese provinces, broken down by transmission type: public transit, relative, social, and unknown. The visualization uses d3.layout.stack to stack the data series, with d3.scale.ordinal for the x-axis and d3.scale.linear for the y-axis. A form allows switching between absolute case counts and percentage-normalized views via stack.offset("expand"), with smooth transitions on the bars and axis. Hovering highlights individual segments using SVG opacity changes, and a custom legend is drawn manually.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed