Skip to main content
100%

polished scatter plot with menu

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

This interactive scatter plot displays the Iris dataset, with dropdown menus controlling which flower measurements appear on the x- and y-axes. The visualization uses React and D3 v5, rendering SVG circles colored teal against a white background. The axis components generate tick marks and labels using scaleLinear and d3.ticks, while the ReactDropdown component manages the selection of attributes like sepal length and petal width. Hovering over any circle reveals its value via an SVG title tooltip, and the layout includes custom axis labels with a fixed margin structure.

AI-generated description

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

MIT Licensed

Similar vizzes