Description Usage Arguments Details Value Examples
Generate a set of six related stat boxes that summarize the distribution of values from a data frame.
1 2 3 4 5 | stat_boxes(x, type = "annual", style = "valueBox", rnd = 0, dec,
height = "110px", width.icon = "90px", text.size = 75,
value.size = 150, output = "boxes",
main_title = "<h4>Aggregate period statistics</h4>",
clrs = c("light-blue", "blue"), theme = "white")
|
x |
a data frame. |
type |
character, type of stat box set. Must be |
style |
character, |
rnd |
decimal places to round data to for appearance in stat box ( |
dec |
character, the sorted unique values of |
height |
character, stat box height. defaults to |
width.icon |
character, icon image width, defaults to |
text.size |
numeric, scaling for text size, defaults to |
value.size |
numeric, scaling for value size, defaults to |
output |
character, |
main_title |
character, typically contains html. Defaults to |
clrs |
character, background colors of stat boxes. See details. |
theme |
color theme, either |
clrs
must be length-one (will be repeated six times), -two (alternating colors), or -six (all colors individually specified).
Colors must be provided in hex format, e.g., #FFFFFF
or a valid Shiny Dashboard color.
This function is typically called by stat_boxes_group
but may be called directly when groups of stat boxes are not needed.
text.size
and value.size
are length-six or length-one (repeated) vectors. Defaults are better suited to
style = "valueBox"
than style = "infoBox"
. Stat box icons are fixed images and come with the apputils
package.
a shiny::tagList
containing a heading and a fluid row of six stat boxes.
1 | #not run
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.