Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

292
Visualizações
MiniCharts Library in R Leaflet- Popup Legend Options

I am using the minicharts package (https://www.rdocumentation.org/packages/leaflet.minicharts/versions/0.6.2) in a leaflet map of mine. It works as expected, however, I wish I could adjust the pop up and legend titles and values. You can see my leaflet map below: enter image description here

I would like the values in the pop up to have % sign after. This would require turning this value into a string. The values, however, have to remain as doubles for the minicharts to read the value and produce the pie chart. Another option would be to set a title for the popup, ex. Sequence % per variant. This would work as well. It would also be handy, if the variants would only show in the popup if they were greater than 0. Lastly, I would also like to set a legend title for the legend on the right side, which shows what colors of the pie chart correspond to which variants.

The code is below:

  final_variant <- final_variant %>% 
addMinicharts(
  JointLabel$long, JointLabel$lat,
  type = "pie",
  chartdata = JointLabel[, c("Alpha_B.1.1.7",
                             "B.1.1.7.E484", 
                             "Beta_B.1.351",
                             "Gamma_P.1",
                             "Omicron_B.1.1.529",
                             "B.1.617",
                             "Kappa_B.1.617.1",
                             "Delta_B.1.617.2",
                             "Mu_B.1.621", 
                             "other"
  )],
  colorPalette = colors,
  popupOptions = list(closeButton = FALSE, showTitle = TRUE),
  width = 30
)

final_variant is just a map file from the spatial file of Europe. I can provide this too, if needed. Thank you for any help

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda