View source: R/style_helpers.R
step_expr | R Documentation |
This function generates a step expression that can be used in your styles.
step_expr(column = NULL, property = NULL, base, values, stops, na_color = NULL)
column |
The name of the column to use for the step expression. If specified, |
property |
The name of the property to use for the step expression. If specified, |
base |
The base value to use for the step expression. |
values |
A numeric vector of values at which steps occur. |
stops |
A vector of corresponding stops (colors, sizes, etc.) for the steps. |
na_color |
The color to use for missing values. Mapbox GL JS defaults to black if this is not supplied. |
A list representing the step expression.
step_expr(
column = "value",
base = "#ffffff",
values = c(1000, 5000, 10000),
stops = c("#ff0000", "#00ff00", "#0000ff")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.