如何用高章程建立组织结构图 [英] How to build an Organization Chart with highcharter

查看:67
本文介绍了如何用高章程建立组织结构图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 highcharter (或可选地,使用另一个R highchart 绘图库)绘制组织结构图.我知道有关该主题的问题已经存在,但由于highchart现在提供了组织结构图.

I want to plot an organization chart with highcharter (or, optionally, with another R highchart plotting library). I know that there are already some questions about that topic but they seem outdated since highchart now offers the possibility of organization chart.

由于raf18seb的响应(非常感谢您的见解),我尝试下载github版本并运行一些反映 sankey 逻辑的代码.但是,不会显示任何情节:

Due to the responses of raf18seb (thanks a lot for you insights), I tried to download the github version and run some code that mirrors the sankey logic. However, no plot is rendered:

devtools::install_github("jbkunst/highcharter")
library(highcharter)

highchart() %>%
  hc_chart(type = 'organization') %>%
  hc_add_series(
    data = list(
      list(from = 'Brazil', to = 'Portugal'),
      list(from = 'Brazil', to = 'Spain'),
      list(from = 'Poland', to = 'England'))
  )

推荐答案

感谢功能请求由@ raf18seb提供,目前,我们可以按如下所示构建组织结构图:

Thanks to the feature request by @raf18seb, currently we can build an organization chart as follows:

devtools::install_github("jbkunst/highcharter", ref = "720")
library(highcharter)

highchart() %>%
  hc_chart(type = 'organization') %>%
  hc_add_series(
    data = list(
      list(from = 'Brazil', to = 'Portugal'),
      list(from = 'Brazil', to = 'Spain'),
      list(from = 'Poland', to = 'England'))
  )

这篇关于如何用高章程建立组织结构图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆