Skip to main content
100%

Scatter Plot with Menus

✓ Published0🌍 Public
HHe Jianfeng
Last edited Apr 14, 2021
Created on Apr 14, 2021
Forked from Cars Scatter Plot

Two dropdown menus at the top of the page allow the user to select which columns of the auto-mpg dataset to plot against each other on the x- and y-axes. The scatter plot uses SVG circles with a fixed radius, and the axes, labels, and gridlines are rendered using d3.axisBottom and d3.axisLeft. When a menu selection changes, the coordinates are recomputed via d3.scaleLinear with a .nice() domain, and the circles transition to their new positions over 1.5 seconds using d3's .transition().duration(1500) with a per-point delay, creating a cascading animation effect.

AI-generated description
MIT Licensed

Similar vizzes