Skip to main content
Public

Share visualization

Loading preview…

Multiple Line plot with Dropdown

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Multiple Line plot with Dropdown

0
KKeerthiKandadai
Last edited May 10, 2020
Created on May 10, 2020

Filtering London air quality data from January 2010 through August 2018, this interactive visualization displays yearly trends for multiple pollutant measures as colored lines, with each year distinguished by a sequential purple color scale. A dropdown menu lets users switch the y-axis among variables like PM2.5, PM10, and nitrogen oxides, updating the line chart with a smooth 1.5-second transition. Built with D3 v5, the example uses `d3.nest` to group data by year, `d3.line` with a basis curve for path generation, and a custom dropdown component; a color legend maps each year to its hue.

AI-generated description

Data in this scatter plot is from from the Kings College London Air Quality Dataset in the London Datastore. The data is from January 2010 through August 2018.

</n> Inspiration from Curran and this Vis. This week I spent time munging the data and adding a dropdown menu.

Comments

Sign in to join the discussion.

MIT Licensed