Skip to content

event_data("plotly_selected") is not working with type="scatter" and mode="lines" #1358

@saurabhbhatt

Description

@saurabhbhatt

In my shiny app, I am trying to see a list of data points on a line plot after the selecting a specific region on the chart but getting the list() output. I used event_data("plotly_selected", source = "A") to get the selected field data.

Below is my plotly code:

nms = row.names(mtcars)

plot_ly(mtcars, source = "A") %>%
add_trace(x = ~mpg, y = ~wt, key = nms, type="scatter", mode = "lines")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions