Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of A scatter plot with menus in React and D3

Public visualization

Viewing a saved revision (read-only)

bb07db3cd19243489898ce2afedf14bb

Fork of A scatter plot with menus in React and D3

0 stars0🌍 Public
Bblackbottt
Last edited May 31, 2022
Created on May 31, 2022

This interactive scatter plot visualizes the iris dataset, allowing users to dynamically select which four measurements (sepal length, sepal width, petal length, petal width) to display on the x and y axes via dropdown menus. The visualization renders SVG circles for each data point, using D3’s `scaleLinear` for axis scaling and `extent` to compute the domains. Axis ticks are generated with `xScale.ticks()` and `yScale.ticks()`, while React’s `useState` manages the selected attributes. The React component structure separates concerns into `AxleBottom`, `AxleLeft`, `Marks`, and `Dropdown` components.

AI-generated description

A scatter plot from the iris dataset