Skip to content

Plot value not restored correctly when interacting with multiple pointers #2431

Open

Description

@mootari

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:

  1. Move the mouse into the frame on either the left or right side so that value reads "foo".
  2. Move the mouse towards the dot until the tip appears; observe that value reads {y: "foo"}.
  3. Within the frame, move the mouse away from the dot until the tip disappears; observe that value reads null instead of "foo".

Demo:

2026-05-07.at.1.34.08.-.Blue.Horse.mp4

Activity

  1. Fil commented on May 7, 2026

    @Fil
    Contributor

    related? #2382

  2. mootari commented on May 7, 2026

    @mootari
    ContributorAuthor

    I'm afraid not, the problem also exists in dev regardless of the pool setting. I've added another example to the notebook using the unreleased version. The only difference is that with pooling enabled only the latter pointer will override the prior pointer's value to null.

    For reference:

    PlotDev.plot({
      margin: 30,
      width: 150 + 60,
      marks: [
        PlotDev.dot([{y: "foo", x: 0}], {x: "x", y: "y", tip: {maxRadius: 100, pool}, r: 10, fill: "blue"}),
        PlotDev.dot([{y: "foo", x: 1}], {x: "x", y: "y", tip: {maxRadius: 100, pool}, r: 10, fill: "red"}),
      ],
    })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn’t working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions