问题
I'd like to create a dependency wheel diagram using the highcharter library in R. Usually I'm just able to look at the javascript code for the plot and translate it for R, but for dependency wheel plots I'm having some trouble. I read that for sankey plot the same arguments are used. And if I use for type = sankey, my code works. So is it even possible to use the wheel dependency function from highcharts in R? I need something like this:
https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/dependency-wheel/
df <- data.frame(
from = c('Brazil', 'Brazil', 'France'),
to = c('Portugal', 'France','Portugal'),
weight = c(5,1,2)
)
highchart()%>%
hc_add_series(data = df,
type = 'dependencywheel')
There is also a package called sankeywheel, but with that, all the flexibility of the highcharts package is lost. So I need another solution.
Thank you!
回答1:
You can find a similar question and answer here: How to build an Organization Chart with highcharter
This is the same problem but with dependencywheel series instead of organization series.
来源:https://stackoverflow.com/questions/59794724/highcharts-dependency-wheel-in-r