Melting Data for Multiple Lines
✓ Published1🌍 Public
Four line charts trace the cumulative counts of COVID-19 exposure categories—travel to Hubei, relative contact, social contact, and public transit—over time. The visualization uses D3 v4 with an SVG renderer, loading data from a CSV and melting it via `d3.nest` to group values by category. A shared ordinal `colorScale` assigns distinct hues to each line, while a custom `colorLegend` component displays the color-to-category mapping with circles and text. The axes are built with `d3.axisBottom` and `d3.axisLeft`, and the lines are drawn as paths using `d3.line`.
AI-generated descriptionMIT Licensed