Skip to main content
Public

Share visualization

Loading preview…

HW1 : Polished Scatter Plot with Menus and Colors and 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

HW1 : Polished Scatter Plot with Menus and Colors and Color Legend

0
Sstephanie0215
Last edited Oct 1, 2022
Created on Oct 1, 2022

This interactive scatter plot visualizes the Iris dataset, letting users explore relationships between sepal and petal measurements by selecting different attributes from two dropdown menus. The visualization uses d3.scaleLinear for axes, d3.scaleOrdinal to map species to colors, and displays a color legend for the three Iris species. Built with React and D3 v7, it renders SVG circles with hover tooltips showing x-values, while React state (useState) handles the user’s menu selections to update the chart dynamically.

AI-generated description

A program that loads in some data using D3 utilities, and uses REACT state to keep track of the data.

Comments

Sign in to join the discussion.

MIT Licensed