Commit 411f11cf authored by vbaudrot's avatar vbaudrot

test without color

parent cc54bc9f
Pipeline #1893 passed with stages
in 3 minutes and 16 seconds
......@@ -301,25 +301,33 @@ server <- function(input, output, session){
return(mapFranceDepartement) # return
})
palImmunity <- colorNumeric(palette = "YlOrRd", domain = unlist(immun_M3_k))
palImmunity <- reactive({
colorNumeric(palette = "YlOrRd", domain = unlist(immun_M3_k))
})
output$mapImmunity <- renderLeaflet({
# pal = palImmunity()
leaflet(data = dataImmunity()) %>%
addTiles() %>%
fitBounds(~-5.142238, ~42.332755, ~8.231781, ~51.089842) %>%
addLegend(position = "bottomright",
title = "Rate immunity",
pal = palImmunity,
pal = palImmunity(),
values = ~ unlist(immun_M3_k))
})
#
# Use a separate observer to recreate polygons as needed.
observe({
colorpal = palImmunity()
proxy <- leafletProxy("mapImmunity")
proxy %>%
addPolygons(data = dataImmunity(),
color = ~palImmunity(Rt_immunity),
# color = ~colorpal(Rt_immunity),
fillOpacity = 0.7)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment