powered by
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)
A list representing the step expression.
The name of the column to use for the step expression. If specified, property should be NULL.
property
The name of the property to use for the step expression. If specified, column should be NULL.
column
The base value to use for the step expression.
A numeric vector of values at which steps occur.
A vector of corresponding stops (colors, sizes, etc.) for the steps.
The color to use for missing values. Mapbox GL JS defaults to black if this is not supplied.
step_expr( column = "value", base = "#ffffff", values = c(1000, 5000, 10000), stops = c("#ff0000", "#00ff00", "#0000ff") )
Run the code above in your browser using DataLab