🌍 Public
Viewing a saved revision (read-only)
e0ac4fdba7da4da7b53a7425b70491b5
Fork of Axes with Hover
This visualization demonstrates hover interaction on a chart with labeled axes. Moving the cursor inside the gray plot area draws black crosshair lines from the pointer to the x and y axes, using the D3 `pointer` event and state management. The plot uses `d3.scaleLinear` for both axes, with `axisBottom` and `axisLeft` rendering ticks. The code relies on D3’s select/join pattern to update the SVG elements dynamically as the mouse position changes.
AI-generated descriptionAdding a hover effect to the inner rectangle to extend lines from the cursor to the axes.
Challenge
- Show the hovered numbers in place of tick marks on the axes themselves.