Skip to main content
Public

Share visualization

Loading preview…

Interactive Color Legend

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

Interactive Color Legend

0
KKhatera Alizada
Last edited Mar 14, 2023
Created on Mar 14, 2023

This interactive visualization displays prescription drug expenditure data from the Medical Expenditure Panel Survey, plotting annual out-of-pocket costs across gender categories. A color legend encodes gender groups using d3.scaleOrdinal with schemeCategory10 colors; hovering over legend items filters the scatter plot marks via d3.selection join operations, dimming non-matching points to 20% opacity. The scatter plot uses d3.scaleLinear for both axes and d3.axisLeft/axisBottom for tick marks. Data loads asynchronously from a CSV file and is parsed with d3.csvParse.

AI-generated description

A scatter plot of the Iris Dataset with a color legend.

Hover on the color legend to highlight the marks that match!

See also:

Comments

Sign in to join the discussion.

MIT Licensed