Description Usage Arguments See Also Examples
Creates a mapdeck legend element for when you want to manually specify a legend (using mapdeck_legend)
1 2 3 4 5 6 7 8 | 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. |
mapdeck_legend
1 2 3 4 5 6 7 | l1 <- legend_element(
variables = c("a","b")
, colours = c("#00FF00","#FF0000")
, colour_type = "fill"
, variable_type = "category"
, title = "my title"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.