简体   繁体   中英

How to flexibly select a region with nodes with d3

The brush function in d3 is great and simple to use. 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?

灵活选择多个节点

There is a D3 plugin called lasso.js which seems to provide the functionality you are looking for. 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. This, however, might be to restrictive for your needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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