observablehq / observablehq/plot

Restrict pointer to chart area

Open
#1,786 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
HTML
Stars
5.4k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

The pointer also responds to mouse movement outside the frame area. This can be disruptive when hovering over axis labels, especially when these labels have links.

Please consider adding an option to constrain pointers to a plot's frames.

https://github.com/observablehq/plot/assets/322014/f5d8838d-7f42-408c-9aaf-b0e8474b9386

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the pointer behavior while moving over the plot frame, axis labels, and linked labels, using the linked example as the reference. Trace the existing pointer interaction entry point and determine how a plot-frame constraint could be exposed as an option; done means movement outside the frame no longer affects the pointer when that option is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3, javascript
Domain
data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.