View source: R/widget-display.R
| sparkline | R Documentation |
A tiny line chart made of block characters (\u2581 to \u2588), one
column per value. With more values than columns, the latest values are
shown (summary = "tail") or buckets are averaged ("mean"). Missing
values are blank. Use push() to stream values.
sparkline(
data = numeric(),
min = NULL,
max = NULL,
summary = "tail",
max_length = 1000L,
id = NULL,
classes = NULL,
style = NULL
)
data |
Numeric vector. |
min, max |
Fixed scale; |
summary |
|
max_length |
Number of values kept by |
id |
Optional identifier. |
classes |
Optional classes. |
style |
A |
A Sparkline with reactive data and method push().
render_widget(sparkline(c(1, 4, 2, 8, 5, NA, 7)), 7, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.