Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

HTML Starter

Public visualization

Viewing a saved revision (read-only)

2f7d9613a2b3493c98e84186bfd4208f

HTML Starter

0 stars0🌍 Public
HHazki
Last edited Jan 27, 2020
Created on Jan 27, 2020
Forked from 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 description

A bare minimum HTML page.

See also React Starter.