plotly / plotly/plotly.R

off event for highlighting not firing for 3d marker/scatter3d

Open
#1,413 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

plotly.js
Dominant language
R
Stars
2.7k
Forks
641
PR merge metrics
No merged PRs in 30d

Description

I have not found a way to deselect highlighted markers in 3d. No off events appear to work when z coordinates are specified with add_markers.

library(plotly)
    d<-data.frame(x=rnorm(10),y=rnorm(10),z=rnorm(10),grp=sample(1:2,10,T),clr=rnorm(10)) %>% highlight_key(~grp)
    # off event fires as expected
    plot_ly(d) %>%
        add_markers(x=~x,y=~y,text=~grp,hoverinfo='text',color=~clr) %>%
        highlight(on='plotly_click',off='plotly_doubleclick')

off

    # no off event fires
    plot_ly(d) %>%
        add_markers(x=~x,y=~y,z=~z,text=~grp,hoverinfo='text',color=~clr) %>%
        highlight(on='plotly_click',off='plotly_doubleclick')

noff

Looping gif makes it look like it's deselecting, but it's not.

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

Start by running the two reproducible R examples in the issue, comparing add_markers with and without z coordinates and the highlight(on='plotly_click', off='plotly_doubleclick') behavior. Trace the 3D marker/scatter3d highlighting path and verify that double-clicking deselects highlighted markers when z coordinates are supplied.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.