Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show modal onclik plotly bar plot #99

Open
kartheeswaran89 opened this issue Aug 6, 2019 · 0 comments
Open

show modal onclik plotly bar plot #99

kartheeswaran89 opened this issue Aug 6, 2019 · 0 comments

Comments

@kartheeswaran89
Copy link

library(shiny)
library(shinymaterial)

df1 <- data.frame(x = 1:10, y = 1:10)
df2 <- data.frame(x = c(rep('a', 10), rep('b', 10)),
y = c(rnorm(10), rnorm(10, 3, 1)))

ui <- material_page(title = "Material Design",
tags$br(),
font_color = "cyan darken-5",
nav_bar_color = "cyan darken-5",
plotlyOutput('scatter')
)

server <- function(input, output) {
output$scatter <- renderPlotly({
plot_ly(df1, x = df1$x, y = df1$y, type = 'bar', source = 'scatter')
})
}

shinyApp(ui = ui, server = server)

the above mentioned code is for the bar chart in plotly, I am struck at a point where I need a help;- I want a pop-up when I click over the bar chart the respective contents to be
displayed.
Please help me on the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant