Input test
A single-page D3.js v5 visualization demonstrates how an HTML range input controls the rotation of two text elements. The page displays "d3.js" and "d3noob.org" as SVG text, and a slider labeled "angle" adjusts the transform attribute of both labels. Moving the slider rotates the first label clockwise from 0 to 360 degrees while the second rotates counterclockwise in the opposite direction, with the current angle displayed live. The code uses D3's selection API, including `d3.select` and `.attr("transform", ...)`, to update the SVG elements in response to the input's `on` event handler.
AI-generated descriptionThis is a demonstration of the use of the html 'range' input to rotate two text elements using d3.js v5.
This graph is part of the code samples for the update to the book D3 Tips and Tricks to version 5 of d3.js.