-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The legend could be improved by moving the NA below the values/colorscale. Similarly in the Asian blog post map:

The legend and labels in the map should probably also be Poppins font - I found a solution online for the NA issue and Christy helped me supplement to fix the font issues with this code, which is added as the last lines before printing the map:
# fix the legend NA placement (https://github.com/rstudio/leaflet/issues/615)
css_fix <- "div.info.legend.leaflet-control br {clear: both;} html * {font-family: Poppins !important;}" # CSS to correct spacing and font family
html_fix <- htmltools::tags$style(type = "text/css", css_fix) # Convert CSS to HTML
medinc_map %<>% htmlwidgets::prependContent(html_fix) # Insert into leaflet HTML code
In the map I generated it makes it look like this (ignore the different color palette):

Metadata
Metadata
Assignees
Labels
No labels
