How to export a highchart (type = 'organization') to PNG image in R?
Here is an example:
library(highcharter)
library(tidyverse)
highchart() %>%
hc_chart(type = 'organization') %>%
hc_add_series(
data = list(
list(from = 'A', to = 'A1'),
list(from = 'A', to = 'A2')
))
I tried as follows, but the exported file is empty:
library(highcharter)
library(tidyverse)
png("org.png")
highchart() %>%
hc_chart(type = 'organization') %>%
hc_add_series(
data = list(
list(from = 'A', to = 'A1'),
list(from = 'A', to = 'A2')
))
dev.off()
