d3 / d3-force

Force-directed graph layout using velocity Verlet integration.
https://d3js.org/d3-force
ISC License
1.82k stars 377 forks source link

Is it possible to search for the nodes? #184

Closed swarnas89 closed 3 years ago

swarnas89 commented 3 years ago

Is there any method through which we could search for a node?

Fil commented 3 years ago

https://github.com/d3/d3-force#simulation_find

swarnas89 commented 3 years ago

I mean to search by node label not by node coordinates?

Fil commented 3 years ago

Nothing specific to the force layout: you might just do nodes.filter(d => d.id.match("something")) ?