Sankey diagram in R networkD3 (or D3) end to end highlighting

左心房为你撑大大i 提交于 2020-01-07 05:01:51

问题


I would like to build a sankey diagram that highlights a path from end to end. I would like to use something free and that doesn't require me to upload data to do so.

This Tableau visualization has exactly the functionality I want- when you hover over one link you can see the entire trajectory from start to finish without highlighting any other link that intersects with the same nodes and each of the link segments align cleanly: https://public.tableau.com/profile/actinvision#!/vizhome/SuperstoreInteractiveSankeyShowcase/Sankey

I have been looking into the networkD3 package in R; the example at Christopher Gandrud’s github site even uses data in a format that I understand.

But how do I change the highlighting functionality?

And how do I make sure that the highlighted path isn't broken? Once the whole path is highlighted I am hoping to also avoid having misaligned links (which would look something like this: http://qinming.github.io/d3-sankey-with-highlighting/ )

Thank you.

来源:https://stackoverflow.com/questions/46795534/sankey-diagram-in-r-networkd3-or-d3-end-to-end-highlighting

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