Input (number) test
This example shows how an HTML number input can control the rotation of a text element in an SVG graphic. The page displays a text label reading "d3noob.org" centered at coordinates (300, 150) within a 600x300 SVG canvas. The code uses `d3.select` to bind an `input` event listener to the number field, and the linked `update` function reassigns the SVG `transform` attribute with the specified rotation angle. The value displayed in the label is updated via a `<span>` element, demonstrating dynamic interaction between form elements and D3-rendered visuals.
AI-generated descriptionThis is a demonstration of the use of the html 'number' 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.