简体   繁体   中英

D3 nodes overlapping

I'm using a modified version of the following example and everything works great so far.

What I am trying to do is to make the nodes bounce from each others and not overlap because I can't see the text and icons of a node if there is another on top of it. Is there a way to make this happen without modifying too much of code that works already? Maybe add something like enabling collision for the nodes?

好的,我似乎将charge设置为.charge(-300),通过将节点彼此推开来将节点分开。

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