Skip to main content
100%

D3 Radio buttons

✓ Published1🌍 Public
KKaustav Sen
Last edited Jul 1, 2021
Created on Jul 1, 2021
Forked from D3 sliders

This example shows a scatterplot of 200 randomly generated points, with radio buttons that filter points by their x-value. Selecting a threshold highlights points above that value in red while leaving the rest black. The code uses D3 v7 to create the SVG, scales, and axes, and attaches click handlers to the radio inputs. The transition method animates the fill color change over 500 milliseconds.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes