observablehq / observablehq/plot
Plot value not restored correctly when interacting with multiple pointers
Open
Nobody has claimed this yet.
bug
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
If the mouse is within the radius of multiple pointers and moves outside of one pointer's max radius, then the plot value will be set to null instead of according to the remaining active pointer.
Example (notebook):
viewof value = Plot.plot({
marks: [
Plot.frame(),
Plot.rect(["foo"], Plot.pointerY({y: d => d, maxRadius: Infinity, fill: "orange"})),
Plot.dot([{y: "foo"}], {y: "y", tip: true})
],
})
Steps:
- Move the mouse into the frame on either the left or right side so that
valuereads"foo". - Move the mouse towards the dot until the tip appears; observe that
valuereads{y: "foo"}. - Within the frame, move the mouse away from the dot until the tip disappears; observe that
valuereads null instead of"foo".
Demo:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Observable notebook linked in the issue and trace the interaction entry points used by Plot.pointerY and the tip from Plot.dot. Reproduce the pointer movement sequence, then verify that leaving the dot keeps value set to "foo" while the pointerY mark remains active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100