How can I access nodes properties of a Sankey chart

亡梦爱人 提交于 2021-02-11 09:44:49

问题


Using the google charts Sankey Diagram, I want to set my self the positions of the nodes: The normal behaviour of a Sankey diagram is that every nodes emerging from others nodes must be aligned on the same vertical line:

My aim is to copy this Sankry Diagram :

As you can see, nodes emerging from the same previous node are not on the same level.

My questions:

Is it possible to access each node property ? From what's google is displaying on its tutorial, one can only modify the behaviour of every nodes :

var options = {
  width: 600,
  sankey: {
    link: { color: { fill: '#d799ae', fillOpacity: 0.8 } },
    node: { colors: [ '#a61d4c' ],
            label: { color: '#871b47' } },
  }
};

If not possible with Google Charts, do you know another web framework that could let me customise the diagram as described ?


回答1:


Have a look at sankeybuilder.com and it's Node Lock feature. SankeyBuilder automatically creates Sankey diagrams from a .TAB separated file that you upload. You could then move Nodes to your desired look/layout and then save their positions. You can then load that diagram in the future or share it with other users via a unique URL. If the underlying data changes you can update the data without affecting the originally stored Node Positions. Optionally you can reset the diagram to the original layout; which allows you to try different Node positions.



来源:https://stackoverflow.com/questions/34977219/how-can-i-access-nodes-properties-of-a-sankey-chart

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