Skip to main content
100%

Line Chart multiple lines | interractive Legend

✓ Published4🌍 Public
Vvladvaculin
Last edited Sep 10, 2019
Created on Sep 10, 2019

This interactive visualization displays a week of temperature data for multiple cities using multiple lines. Users can click on legend items or line paths to isolate a specific city’s data, which reduces the opacity of other lines for focused comparison. Built with D3 v5, the code utilizes `scaleOrdinal` for color mapping, `nest` and `line` for path generation, and a custom `colorLegend` component with `setSelected` and `selected` for interactive state management. The SVG render includes axes with gridlines and hover effects on paths.

AI-generated description

Click on Legend or paths to isolate the data!

MIT Licensed

Similar vizzes