Input test
This example demonstrates how an HTML range input slider controls the rotation of an SVG text element in D3.js v6. The text "d3noob.org" is initially centered and rotated to 0 degrees, then updates its angle in real time as the user drags the slider from 0 to 360. The code selects the range input with `d3.select("#nAngle")` and listens for the `input` event to trigger an `update` function, which dynamically modifies the `transform` attribute of the text element. Rendering is done via SVG appended to the body with D3's selection and attribute methods.
AI-generated descriptionThis is a demonstration of the use of the html 'range' input to rotate a text element using d3.js v6.
This graph is part of the code samples for the update to the book D3 Tips and Tricks to version 6 of d3.js.