Infection Type Chart
✓ Published2🌍 Public
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 descriptionReact Starter code.
MIT Licensed