Search code examples
rhighchartsr-highcharter

Add borderColor for map Highcharter R



How to add a border for map plot in Highcharter in R?
In https://jkunst.com/highcharter/articles/highcharts-api.html showed `borderColor = '#EBBA95'`, but it change border inside map

What I need: enter image description here

What I have with this function:

library(highcharter)
hcmap("countries/nz/nz-all", 
      borderColor = "darkred")

enter image description here


Solution

  • You could set the borderColor of the chart via hc_chart():

    library(highcharter)
    hcmap("countries/nz/nz-all") %>% 
      hc_chart(borderColor = "darkred", borderWidth = 10)