Skip to main content
Public

Share visualization

Loading preview…

Making A 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

Making A Color Legend

1
MMichael Bergerson
Last edited Feb 9, 2021
Created on Feb 9, 2021

This interactive scatter plot visualizes the classic Iris dataset, mapping petal length against sepal width. Each point is colored by species using a `d3.scaleOrdinal` color scale, with a custom color legend built from React components that displays the species names alongside colored circles. The visualization uses `d3.scaleLinear` for both axes, includes formatted tick labels, and incorporates tooltips via SVG `<title>` elements. Rendering is done through React and D3 v5, with data loaded asynchronously from a CSV file.

AI-generated description

A scatter plot of The Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed