🌍 Public
Viewing a saved revision (read-only)
54fd4835a32c4f3f9cfddfba69f29256
Fork of A scatter plot with menus in React and D3
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 descriptionA scatter plot from the iris dataset