Skip to content

when use conditionalPanel , jqui_resizable will auto set plotout width 100% #90

@Liripo

Description

@Liripo
library(shiny)
library(shinyjqui)
library(ggplot2)

ui <- fluidPage(
  selectInput("select",label = "Panel",choices = c("a","b"),selected = "a"),
  conditionalPanel(
    condition = "input.select == 'a'",
    jqui_resizable(plotOutput("plot1",width = "50%"))
  ),
  conditionalPanel(
    condition = "input.select == 'b'",
    jqui_resizable(plotOutput("plot2",width = "50%"))
  )
)

server <- function(input,output) {
  output$plot1 <- renderPlot({ggplot()})
  output$plot2 <- renderPlot({ggplot()})
}

shinyApp(ui,server)

Above is a reproducible example, in the second image the width is automatically 100%.like this:

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions