Skip to content

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

Open
@brooksambrose

Description

@brooksambrose

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions