# NOT RUN {
library(shiny)
library(waiter)
# diagonal line
path <- "M10 10L90 30"
ui <- fluidPage(
use_waiter(),
use_hostess(),
actionButton("draw", "redraw"),
plotOutput("plot")
)
server <- function(input, output) {
dataset <- reactive({
input$draw
hostess <- Hostess$new(min = 0, max = 10)
hostess$set_loader <- hostess_loader(
progress_type = "stroke",
stroke_color = hostess_stripe()
)
waiter <- Waiter$new(
"plot",
hostess$loader()
)
waiter$show()
for(i in 1:10){
Sys.sleep(.2)
hostess$inc(1)
}
runif(100)
})
output$plot <- renderPlot(plot(dataset()))
}
if(interactive()) shinyApp(ui, server)
# }
Run the code above in your browser using DataLab