set_formatter_traffic_light {rtabulator} | R Documentation |
Set traffic light formatter
Description
Set traffic light formatter
Usage
set_formatter_traffic_light(
widget,
column,
min = NA,
max = NA,
color = c("green", "orange", "red"),
hoz_align = "center"
)
Arguments
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. |
Value
The updated tabulator()
HTML widget
Examples
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")
[Package rtabulator version 0.1.2 Index]