Description Active bindings Methods Examples
Create a waitress (progress bar) and programmatically set or increase its percentage, then hide it when done.
max
Maximum value of the bar.
min
Minimum value of the bar.
new()
Waitress$new( selector = NULL, theme = c("line", "overlay", "overlay-radius", "overlay-opacity", "overlay-percent"), min = 0, max = 100, infinite = FALSE, hide_on_render = FALSE )
selector
Element selector to apply the waitress to,
if NULL
then the waitress is applied to the whole screen.
theme
A valid theme, see function usage.
min, max
Minimum and maximum representing the starting and ending points of the progress bar.
infinite
Set to TRUE
to create a never ending loading bar, ideal
when you cannot compute increments or assess the time it might take before the
loading bar should be removed.
hide_on_render
Set to TRUE
to automatically hide the waitress
when the element in id
is rendered. Note the latter will work with
shiny plots, tables, htmlwidgets, etc. but will not work with arbitrary
elements.
color, percent_color
Color of waitress and color of percent text shown when
theme
is set to overlay-percent
.
Create a waitress.
\dontrun{Waitress$new("#plot")}
start()
Waitress$start( html = NULL, background_color = "transparent", text_color = "black" )
html
HTML content to show over the waitress, accepts htmltools and shiny tags.
background_color
The background color of the html.
text_color
The color of the html
content.
Start the waitress.
\dontrun{Waitress$new("#plot")$start()}
notify()
Waitress$notify( html = NULL, background_color = "white", text_color = "black", position = c("br", "tr", "bl", "tl") )
html
HTML content to show over the waitress, accepts htmltools and shiny tags.
background_color
The background color of the html.
text_color
The color of the html
content.
position
Position of the notification on the screen.
Where br
is the bottom-right, tr
is the top-right,
bl
is bottom-left, and tl
is the top-left.
Show the waitress as a notification.
\dontrun{Waitress$new()$notify()}
set()
Waitress$set(value)
value
Value to set waitress to.
Set the waitress to a specific percentage.
\dontrun{Waitress$new("#plot")$set(20)}
auto()
Waitress$auto(value, ms)
value
Value to set waitress to.
ms
Number of Milliseconds
Automatically start and end the waitress.
\dontrun{Waitress$new("#plot")$auto(20, 2000)}
inc()
Waitress$inc(value)
value
Value to increase waitress to.
Increase the waitress by a percentage.
\dontrun{Waitress$new("#plot")$inc(30)}
close()
Waitress$close()
Close the waitress.
\dontrun{Waitress$new("#plot")$close()}
getMin()
Waitress$getMin()
Get minimum value
getMax()
Waitress$getMax()
Get maximum value
getValue()
Waitress$getValue()
Get current value
print()
Waitress$print()
Print the waitress.
\dontrun{Waitress$new("#plot")$hide()}
clone()
The objects of this class are cloneable with this method.
Waitress$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ## ------------------------------------------------
## Method `Waitress$new`
## ------------------------------------------------
## Not run: Waitress$new("#plot")
## ------------------------------------------------
## Method `Waitress$start`
## ------------------------------------------------
## Not run: Waitress$new("#plot")$start()
## ------------------------------------------------
## Method `Waitress$notify`
## ------------------------------------------------
## Not run: Waitress$new()$notify()
## ------------------------------------------------
## Method `Waitress$set`
## ------------------------------------------------
## Not run: Waitress$new("#plot")$set(20)
## ------------------------------------------------
## Method `Waitress$auto`
## ------------------------------------------------
## Not run: Waitress$new("#plot")$auto(20, 2000)
## ------------------------------------------------
## Method `Waitress$inc`
## ------------------------------------------------
## Not run: Waitress$new("#plot")$inc(30)
## ------------------------------------------------
## Method `Waitress$close`
## ------------------------------------------------
## Not run: Waitress$new("#plot")$close()
## ------------------------------------------------
## Method `Waitress$print`
## ------------------------------------------------
## Not run: Waitress$new("#plot")$hide()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.