如何访问Sankey图表的节点属性 [英] How can I access nodes properties of a Sankey chart

查看:96
本文介绍了如何访问Sankey图表的节点属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Google图表

我的目的是复制此Sankry图:

如您所见,从同一先前节点出现的节点不在同一级别.

我的问题:

是否可以访问每个节点的属性?根据google在其教程中显示的内容,只能修改每个节点的行为:

  var选项= {宽度:600,sankey:{链接:{颜色:{填充:'#d799ae',fillOpacity:0.8}},节点:{颜色:['#a61d4c'],标签:{color:'#871b47'}},}}; 

如果无法使用Google Charts,您是否知道另一个Web框架可以让我按照所述自定义图表?

解决方案

看看sankeybuilder.com及其节点锁定功能.SankeyBuilder会根据您上载的.TAB分隔文件自动创建Sankey图.然后,您可以将节点移动到所需的外观/布局,然后保存其位置.然后,您可以在将来加载该图或通过唯一的URL与其他用户共享.如果基础数据发生更改,则可以在不影响最初存储的节点位置的情况下更新数据.(可选)您可以将图表重置为原始布局.这可以让您尝试不同的Node位置.

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 ?

解决方案

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.

这篇关于如何访问Sankey图表的节点属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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