set_formatter_traffic_light | R Documentation |
Set traffic light formatter
set_formatter_traffic_light(
widget,
column,
min = NA,
max = NA,
color = c("green", "orange", "red"),
hoz_align = "center"
)
widget |
A |
column |
The name of the column the formatter is applied to. |
min |
(numeric): The minimum value for progress bar.
If set to |
max |
(numeric): The maximum value for progress bar.
If set to |
color |
(character): Either a single color or a vector of colors |
hoz_align |
(character): The horizontal alignment of the column. |
The updated tabulator()
HTML widget
data <- data.frame(
label = 1:10,
value = 1:10
)
tabulator(data, width = 200) |>
set_formatter_traffic_light("value") |>
set_formatter_plaintext("label", hoz_align = "center")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.