🌍 Public
Viewing a saved revision (read-only)
aaeb46e7c61646edaf5cc6e6957725d7
HTML Starter
This example demonstrates a crosshair annotation that follows pointer movement over an SVG. The visualization uses d3fc's `annotationSvgCrosshair` and `pointer` APIs to track mouse position and render intersecting horizontal and vertical lines at that location. Scales are defined with d3.scaleLinear. The code renders to a 1000x1000 SVG element within an HTML page, with a React framework setup. Each pointer event triggers a re-render, updating the crosshair's datum with the latest cursor coordinates.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.