Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Axes with Hover_drb

Public visualization

Viewing a saved revision (read-only)

8abcd75ea864470dbbda39c48bf84c11

Axes with Hover_drb

0 stars1🌍 Public
DDonald Bagwell
Last edited Apr 13, 2024
Created on Apr 13, 2024
Forked from Responsive Axes

This example demonstrates interactive axes with crosshair hover lines. Moving the mouse over the plotting area draws vertical and horizontal black lines that track the cursor position, updating dynamically via D3’s `pointer` event and state management. The visualization uses D3 scales (`scaleLinear`) to map data ranges to pixel coordinates, with axis components built using `axisBottom` and `axisLeft`. A styled inner rectangle defines the plotting region, while axis labels are positioned manually. The code relies on D3.js version 7.9.0 and includes resize observation via `ResizeObserver`.

AI-generated description

Creating circles with D3.

Challenge

  • Fork this example
  • Modify it
  • Maybe make it Halloween themed
  • Maybe make it Christmas themed
  • Be creative