d3 Sankey - 是否可能影响或决定节点的位置? [英] d3 Sankey - Is it possible to affect or decide the placement of nodes?

查看:405
本文介绍了d3 Sankey - 是否可能影响或决定节点的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用dank的Sankey插件。是否有影响节点自动放置的方法?



如果您比较以下2张图片。



自动生成的Sankey图表:



p>

您会看到节点之间的对齐方式居中,这使得在手动重新排列节点之前难以使用图。我可以以某种方式影响这个流程 - 或者它只是它的方式?



顺便说一句 - 有一种方法来指定节点的文本不应该长于节点的高度?

解决方案

根据演示及其解释,没有办法影响放置(和简单看看源代码确认)。类似地,没有办法指定节点的文本不应该长于节点的高度。


I'm working with the Sankey plugin for d3.js. Is there a way to affect the automatic placement of the nodes?

If you compare the below 2 images.

Automatically generated Sankey Diagram: https://files.secureserver.net/0s3DEU5s3OZtqL

After I have manually re-arranged it: https://files.secureserver.net/0sYJF1w7f54wdF

You see that the nodes are aligned centered after each other which make it hard to use the diagram until you manually rearrange the nodes. Can I affect this flow somehow - or is it just the way it is?

By the way - Is there a way to specify that the text for the nodes should not be longer than the height of the nodes?

解决方案

According to the demo and its explanation, there is no way to affect the placement (and a brief look at the source confirms that). Similarly, there's no way to specify that the text for the nodes should not be longer than the height of the nodes.

这篇关于d3 Sankey - 是否可能影响或决定节点的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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