Skip to main content
Public

Share visualization

Loading preview…

Polished Scatter Plot with Menus

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

Polished Scatter Plot with Menus

0
Mmuhammadshumas
Last edited Dec 29, 2021
Created on Dec 29, 2021

A scatter plot of the Iris Dataset, rendered in SVG by React, uses dropdown menus to select which of four measurements appears on the x and y axes. The menus, powered by ReactDropdown, update state via `useState` and `useCallback`, triggering re-renders that pass new scales from D3 `scaleLinear` to the reusable `AxisBottom`, `AxisLeft`, and `Marks` components. Axes are drawn from `xScale.ticks()`, while circles use `xValue` and `yValue` accessors, with `format('.2s')` for tick labels and native `<title>` tooltips.

AI-generated description

A scatter plot of The Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed