Skip to main content
100%

Double Input Test

✓ Published0🌍 Public
Dd3noob
Last edited Nov 30, 2019
Created on Apr 14, 2014

Two HTML range sliders control the height and width of a single blue-outlined rectangle rendered as an SVG element. Dragging either input triggers a D3 update function that resizes the rectangle symmetrically around its center. The example uses D3 version 3.5.17 to bind the `input` events and select/update the SVG `rect` attributes, while the slider labels display the current numeric values. The code demonstrates interactive coordination between standard form controls and D3-driven SVG manipulation.

AI-generated description

This is an example of implimenting multiple HTML inputs using <range> input tags and using them to adjust a d3.js drawn svg element (a rectangle).

It is used as an example and described in the book D3 Tips and Tricks.

mit Licensed

Similar vizzes