Closed cjprobst closed 2 years ago
In the example below the export button for the plot vanishes the moment the first plot is rendered, when a busy indicator is added to the app.
`library(esquisse) library(shiny) library(ggplot2) library(shinybusy)
ui <- fluidPage(
titlePanel("Use esquisse as a Shiny module"), add_busy_spinner(spin = "fading-circle", position = "full-page"), sidebarLayout( sidebarPanel( radioButtons( inputId = "data", label = "Select data to use:", choices = c("mpg", "diamonds", "economics") ) ), mainPanel( tabsetPanel( tabPanel( title = "esquisse", esquisse_ui( id = "esquisse", header = FALSE # dont display gadget title , controls = c("labs", "parameters", "appearance"
) ) ), tabPanel( title = "output", tags$b("Code:"), verbatimTextOutput("code"), tags$b("Filters:"), verbatimTextOutput("filters"), tags$b("Data:"), verbatimTextOutput("data") ) ) )
) )
server <- function(input, output, session) {
data_r <- reactiveValues(data = iris, name = "iris")
observe({ data_r$data <- get(input$data) data_r$name <- input$data })
results <- esquisse_server( id = "esquisse", data_rv = data_r )
output$code <- renderPrint({ results$code_plot })
output$filters <- renderPrint({ results$code_filters })
output$data <- renderPrint({ str(results$data) })
}
shinyApp(ui, server)`
I think the button is moved to the background of the plot, but I don't know how to solve the problem.
Thanks for any help!
shinybusy_0.2.0 ggplot2_3.3.1 shiny_1.7.1 esquisse_1.0.2
Thnaks for reporting this. It's fixed if you install dev version from GitHub. Soon on CRAN.
Victor
In the example below the export button for the plot vanishes the moment the first plot is rendered, when a busy indicator is added to the app.
`library(esquisse) library(shiny) library(ggplot2) library(shinybusy)
ui <- fluidPage(
titlePanel("Use esquisse as a Shiny module"), add_busy_spinner(spin = "fading-circle", position = "full-page"), sidebarLayout( sidebarPanel( radioButtons( inputId = "data", label = "Select data to use:", choices = c("mpg", "diamonds", "economics") ) ), mainPanel( tabsetPanel( tabPanel( title = "esquisse", esquisse_ui( id = "esquisse", header = FALSE # dont display gadget title , controls = c("labs", "parameters", "appearance"
, "filters", "code"
) )
server <- function(input, output, session) {
data_r <- reactiveValues(data = iris, name = "iris")
observe({ data_r$data <- get(input$data) data_r$name <- input$data })
results <- esquisse_server( id = "esquisse", data_rv = data_r )
output$code <- renderPrint({ results$code_plot })
output$filters <- renderPrint({ results$code_filters })
output$data <- renderPrint({ str(results$data) })
}
shinyApp(ui, server)`
I think the button is moved to the background of the plot, but I don't know how to solve the problem.
Thanks for any help!
shinybusy_0.2.0 ggplot2_3.3.1 shiny_1.7.1 esquisse_1.0.2