Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Axes with Hover

Public visualization

Viewing a saved revision (read-only)

2d8935d6f3e44a32ad14b222311504a9

Axes with Hover

0 stars6🌍 Public
CCurran Kelleher
Last edited Feb 9, 2024
Created on Feb 9, 2024
Forked from Responsive Axes

This example displays a scatter plot with labeled axes and a hover interaction. Moving the cursor over the inner rectangle draws black crosshair lines from the pointer to the x- and y-axes, dynamically revealing the mouse coordinates. The visualization uses D3's scaleLinear for mapping data, axisBottom and axisLeft for tick marks, and a ResizeObserver for responsive sizing. Hover events are captured via d3.pointer, updating state to drive the lines. The example is a static 100x100 data range with no external dataset.

AI-generated description