问题描述
我想使用R中的highcharter库创建一个依赖轮图.通常,我只能查看该图的javascript代码并将其翻译为R,但是对于依赖轮图,我却拥有有点麻烦我读过,对于sankey plot,使用了相同的参数.如果我使用type = sankey,则我的代码有效.那么,甚至有可能在R中使用highcharts中的wheel依赖函数吗?我需要这样的东西:
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:
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')
还有一个名为sankeywheel的软件包,但与此同时,highcharts软件包的所有灵活性都丧失了.所以我需要另一种解决方案.
There is also a package called sankeywheel, but with that, all the flexibility of the highcharts package is lost. So I need another solution.
谢谢!
推荐答案
您可以在此处找到类似的问题和答案:
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.
这篇关于R中的Highcharts依赖轮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!