grid_style_column {toastui} | R Documentation |
Set column style
Description
Apply styles to a column according to CSS properties declared by expression based on data passed to grid..
Usage
grid_style_column(
grid,
column,
background = NULL,
color = NULL,
fontWeight = NULL,
...
)
Arguments
grid |
A grid created with |
column |
Name of column (variable name) where to apply style. |
background |
Background color. |
color |
Text color. |
fontWeight |
Font weight, you can use |
... |
Other CSS properties. |
Value
A datagrid
htmlwidget.
Examples
library(toastui)
library(scales)
datagrid(mtcars) %>%
grid_style_column(
column = "mpg",
background = col_numeric("Blues", domain = NULL)(mpg),
fontWeight = "bold",
color = ifelse(mpg > 25, "white", "black")
)
datagrid(mtcars) %>%
grid_style_column(
column = "mpg",
background = col_numeric("Blues", domain = NULL)(mpg),
fontWeight = "bold",
color = ifelse(mpg > 25, "white", "black")
) %>%
grid_style_column(
column = "cyl",
background = col_bin("Blues", domain = NULL)(cyl),
fontStyle = "italic"
)
[Package toastui version 0.3.3 Index]