Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip nullFormat not working in maps #789

Open
rwaaijman opened this issue Feb 17, 2023 · 1 comment
Open

Tooltip nullFormat not working in maps #789

rwaaijman opened this issue Feb 17, 2023 · 1 comment

Comments

@rwaaijman
Copy link

when creating a map with missing data, I would like to show a tooltip "Missing"
It took a long time before I found the solution: series(nullInteraction = TRUE).
Is it possible to set this standard on TRUE?


mapdata <- get_data_from_map(download_map_data("custom/usa-and-canada"))

glimpse(mapdata)

data_fake <- mapdata |>
  select(code = `hc-a2`) |>
  mutate(value = 1e5 * abs(rt(nrow(mapdata), df = 10)))

# value NT on not available
data_fake$value[data_fake$code == "AZ"] <- NA

glimpse(data_fake)


highchart(type = "map") |>
  hc_chart(map = download_map_data("custom/usa-and-canada")) |>
  hc_add_series(
    data_fake
    , joinBy = c("hc-a2", "code")
    , name = "Fake data"
    , dataLabels = list(enabled = TRUE, format = "{point.name}", nullFormat = "N/A")
    #, nullInteraction = TRUE
  ) |>
  hc_colorAxis(auxpar = NULL) |>
  hc_tooltip(valueDecimals = 0, nullFormat = "Missing data")```
Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Feel free to reopen it if you find it necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant