I'm trying to make a map of France to illustrate some frequencies, but there is an error when using the data labels since french characters are not recognized.
For instance La Réunion is displayed as la RA@union.
Is there a way to use a different data set for the data labels? This is my code:
mapdata <- get_data_from_map(download_map_data("countries/fr/fr-all-all"))
data_fake <- mapdata %>%
select(code = `hc-a2`) %>%
mutate(frequence = 0.5 * abs(rt(nrow(.), df = 10)))
glimpse(data_fake)
## Observations: 52
hcmap("countries/fr/fr-all-all", data = data_fake, value = "frequence",
joinBy = c("hc-a2", "code"), name = "Fake data",
dataLabels = list(enabled = TRUE, format = '{point.name}'),
borderColor = "#FAFAFA", borderWidth = 0.1,
tooltip = list(valueDecimals = 2, valuePrefix = "$", valueSuffix = " USD")) %>%
hc_mapNavigation(enabled = TRUE)
This was a bug fixed in the development version of highcharter
.
source: https://github.com/jbkunst/highcharter/commit/722f69a5ba8856eaa74623a8fef4bc6fcb542694