Skip to main content
100%

scatter plot with menu

✓ Published1🌍 Public
MMATTE-blz
Last edited Apr 8, 2021
Created on Apr 7, 2021

A scatter plot of the Iris dataset, encoded as SVG circles, allows the user to select which quantitative variable to plot on the x- and y-axes via two dropdown menus. The chart updates the scales, axes, and labels based on the chosen attributes using React state and D3 scaleLinear and extent functions. Data is loaded asynchronously with d3.csv.

AI-generated description

{xScale.ticks().map((tickValue) => ( <line x1={xScale(tickValue)} y1={0} x2={xScale(tickValue)} y2={innerHeight} stroke={'black'} /> ))}

MIT Licensed

Similar vizzes