简体   繁体   English

如何使用d3的节点灵活选择区域

[英]How to flexibly select a region with nodes with d3

The brush function in d3 is great and simple to use. d3中的画笔功能非常好并且易​​于使用。 However, for a complex graph like a force-directed tree and scatter plot graph, more flexible selection of nodes may be necessary to understand the property of a particular region. 但是,对于像力导向树和散点图这样的复杂图形,可能需要更灵活地选择节点才能理解特定区域的属性。

Is there any way to implement such kind of selection in D3? 有什么方法可以在D3中实现这种选择?

灵活选择多个节点

There is a D3 plugin called lasso.js which seems to provide the functionality you are looking for. 有一个名为lasso.js的D3插件,它似乎提供了您正在寻找的功能。 The example looks like the graphic you attached to your post. 示例看起来像您附加到帖子的图形。

Another one worth a look is the Polybrush plugin which provides a polygon selection. 另一个值得一看的是Polybrush插件,它提供了多边形选择。 This, however, might be to restrictive for your needs. 但是,这可能会限制您的需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM