【发布时间】:2020-06-16 08:59:04
【问题描述】:
对于我的项目,我需要提取“Box Select”的 x 和 y 坐标,我用它来在闪亮的应用程序中选择数据(因为我需要在一个时间范围内根据这些值进行过滤)。更准确地说 - 我只需要创建框的实际坐标,而不需要内部选定 ID 的 x/y 值。
已经谢谢了。
library(shiny)
library(plotly)
ui <- fluidPage(
plotlyOutput('myPlot'),
)
server <- function(input, output, session){
output$myPlot = renderPlotly({
plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length, color = ~Species) %>%
layout(dragmode = "select")
})
}
shinyApp(ui, server)
【问题讨论】: