D3 Radio buttons
✓ Published1🌍 Public
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed