Creates a mapdeck legend element for when you want to manually specify a legend (using mapdeck_legend)
legend_element( variables, colours, colour_type = c("fill", "stroke"), variable_type = c("category", "gradient"), title = "", css = "" )
| variables | variables assigned to colours |
|---|---|
| colours | vector of hex colours assigned to variables |
| colour_type | one of "fill" or "stroke" |
| variable_type | one of category (discrete) or gradient (continuous) |
| title | string used as the legend title |
| css | string of css to control appearance. |