Input test
A simple HTML range input controls the rotation of a text label in an SVG element, with the current angle displayed live beside the slider. The example uses D3.js version 3.5.17 to select the input element and bind its `input` event, updating both the text label and the `transform` attribute of the SVG `<text>` node via `attr`. The SVG is appended to the body with a fixed width and height, and the text is centered at coordinates (300,150). The code demonstrates event-driven interaction between native HTML form controls and D3-managed SVG rendering.
AI-generated descriptionThis is a simple example of implimenting an HTML input using a <range> input tag and using that to adjust a d3.js drawn svg element (rotate text).
It is used as an example and described in the book D3 Tips and Tricks.