是否有解决方案在R sankeyNetwork图中对节点的整个路径进行hilite?
你可以在这里看到一个有效的例子: https://setsna2.shinyapps.io/sankey-shinyforallcities/
点击节点Leadship& Strategy,您将看到左侧和右侧的路径将被高亮显示。我想在R Shiny中做到这一点,是否有可能在R中使用sankeyNetwork图进行相同的hiliting?
当我这样做时,它不起作用
URL <- paste0('https://cdn.rawgit.com/christophergandrud/networkD3/',
'master/JSONdata/energy.json');energy <- jsonlite::fromJSON(URL);sankeyNetwork(Links = energy$links, Nodes = energy$nodes, Source = 'source',
Target = 'target', Value = 'value', NodeID = 'name',
units = 'TWh', fontSize = 12, nodeWidth = 30)