Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Radio buttons

Public visualization

D3 Radio buttons

0 stars1🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed