
Last chance! 50% off unlimited learning
Sale ends in
Customise the Hostess laoding bar.
hostess_loader(
id = "hostess",
preset = NULL,
text_color = "#FFFFFF",
center_page = FALSE,
class = "",
min = 0,
max = 100,
svg = NULL,
progress_type = c("stroke", "fill"),
fill_direction = c("btt", "ttb", "ltr", "rtl"),
stroke_direction = c("normal", "reverse"),
fill_color = NULL,
stroke_color = NULL,
...,
with_waiter
)hostess_gradient(angle = 0, duration = 1, colors = c("red", "white", "blue"))
hostess_bubble(
color_background = "#697682",
color_bubble = "#f7fff7",
count = 25,
duration = 1
)
hostess_stripe(color1 = "#697682", color2 = "#f7fff7", duration = 1)
Id of hostess (valid CSS).
A loading bar preset, see section below.
The color of the loading text.
By default the hostess is not centered in the middle
of the screen, centering in the middle of the page is however ideal when using
it with waiter full screen, for the latter set to TRUE
.
CSS class.
Minimum and maximum representing the starting and ending points of the progress bar.
Either an svg path e.g.: M10 10L90 10
or the path to a .svg
file. Note that if passing the latter it must be made available to Shiny by
placing it either in the www
folder or using addResourcePath.
The progress type, either stroke
or fill
.
Ther former traces the path of the svg
while the latter fills it progressively.
The direction which the progress bar should
take. Wether fill_direction
or stroke_direction
is used depends on
progress_type
.
The color to use for the progress bar.
Wether fill_color
or stroke_color
is used depends on
progress_type
.
Any other other advanced options to pass to the loaded see the official documentation.
Deprecate in favour of center_page
.
Angle of gradient.
Duration of the loop.
Color vectors composing the gradient.
The background of the color.
The color of the bubbles contour.
The number of bubbles.
Colors of stripes.
line
fan
circle
bubble
rainbow
energy
stripe
text
# 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