Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data_sub = reactive({
- data_sub_temp = df[df$market == input$market_selector,]
- return(data_sub_temp)
- })
- output$market_plot <- renderPlotly({
- plot_ly(
- data = data_sub,
- x = ~ created,
- y = ~ pax,
- group_by = ~ type,
- color = ~ type,
- type = "scatter",
- mode = "lines+markers",
- hoverinfo = 'text',
- text = ~ paste('Year:', created,
- '</br> </br> Clients: ', pax)
- )
- })
- actionButton(
- inputId = "submit_loc",
- label = "Submit")
- observeEvent(
- eventExpr = input[["submit_loc"]],
- handlerExpr = {
- data_sub <- df[df$market == input$market_selector,]
- output$market_plot <- renderPlotly({
- plot_ly(
- data = data_sub,
- x = ~ created,
- y = ~ pax,
- group_by = ~ type,
- color = ~ type,
- type = "scatter",
- mode = "lines+markers",
- hoverinfo = 'text',
- text = ~ paste('Year:', created,
- '</br> </br> Clients: ', pax)
- )
- })
- })
- data_sub <- reactive({df[df$market == input$market_selector,]})
- output$market_plot <- renderPlotly({
- plot_ly(
- data = data_sub(),
- x = ~ created,
- y = ~ pax,
- group_by = ~ type,
- color = ~ type,
- type = "scatter",
- mode = "lines+markers",
- hoverinfo = 'text',
- text = ~ paste('Year:', created,
- '</br> </br> Clients: ', pax)
- )
- })
- output$market_plot <- renderPlotly({
- plot_ly(
- data = data_sub(),
- x = ~ created,
- y = ~ pax,
- group_by = ~ type,
- color = ~ type,
- type = "scatter",
- mode = "lines+markers",
- hoverinfo = 'text',
- text = ~ paste('Year:', created,
- '</br> </br> Clients: ', pax)
- )
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement