if (FALSE) {
# Create a dark theme legend style
dark_style <- legend_style(
background_color = "#2c3e50",
text_color = "white",
title_color = "white",
font_family = "Arial",
title_font_weight = "bold",
element_border_color = "white",
element_border_width = 1,
shadow = TRUE,
shadow_color = "rgba(0,0,0,0.3)",
shadow_size = 6
)
# Use the style in a legend
add_categorical_legend(
map = map,
legend_title = "Categories",
values = c("A", "B", "C"),
colors = c("red", "green", "blue"),
style = dark_style
)
# Create a minimal style with just borders
minimal_style <- legend_style(
element_border_color = "gray",
element_border_width = 1
)
}
Run the code above in your browser using DataLab