Method new()
Usage
Waitress$new(
selector = NULL,
theme = c("line", "overlay", "overlay-radius", "overlay-opacity", "overlay-percent"),
min = 0,
max = 100,
infinite = FALSE,
hide_on_render = FALSE
)
Arguments
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
.
Details
Create a waitress.
Examples
\dontrun{Waitress$new("#plot")}
Usage
Waitress$start(
html = NULL,
background_color = "transparent",
text_color = "black"
)
Arguments
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.
Details
Start the waitress.
Examples
\dontrun{Waitress$new("#plot")$start()}
Method notify()
Usage
Waitress$notify(
html = NULL,
background_color = "white",
text_color = "black",
position = c("br", "tr", "bl", "tl")
)
Arguments
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.
Details
Show the waitress as a notification.
Examples
\dontrun{Waitress$new()$notify()}
Method set()
Usage
Waitress$set(value)
Arguments
value
Value to set waitress to.
Details
Set the waitress to a specific percentage.
Examples
\dontrun{Waitress$new("#plot")$set(20)}
Method auto()
Usage
Waitress$auto(value, ms)
Arguments
value
Value to set waitress to.
ms
Number of Milliseconds
Details
Automatically start and end the waitress.
Examples
\dontrun{Waitress$new("#plot")$auto(20, 2000)}
Method inc()
Usage
Waitress$inc(value)
Arguments
value
Value to increase waitress to.
Details
Increase the waitress by a percentage.
Examples
\dontrun{Waitress$new("#plot")$inc(30)}
Details
Close the waitress.
Examples
\dontrun{Waitress$new("#plot")$close()}
Details
Get minimum value
Details
Get maximum value
Method getValue()
Usage
Waitress$getValue()
Details
Get current value
Details
Print the waitress.
Examples
\dontrun{Waitress$new("#plot")$hide()}
Method clone()
The objects of this class are cloneable with this method.
Usage
Waitress$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.