Description Usage Arguments Value
View source: R/fct_dt_styling.R
Makes a DataTable HTML widget background fill for cells corresponding to the numeric value. Either as a continuous scale gradient between red (negative) and green (positive) or as a simple positive (green) and negative (red) fill.
1 2 3 4 5 6 7 | dt_gradient(
table,
columns,
colors,
gradient_type = c("gradient", "posneg"),
...
)
|
table |
a table to display |
columns |
names of columns to prepare |
colors |
vector of two colors for the min/max of the gradient |
gradient_type |
either |
... |
named arguments passed onto DT::datatable |
A DataTable HTML widget with gradient color coding
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.