Highcharts Dependency wheel in R

家住魔仙堡 提交于 2021-01-29 09:13:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!