Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search for an element in D3 - force layout or tree

Is there an example of searching for an element in a d3js layout (force directed or tree) and highlighting that element?

I am thinking that there would be a text field where user enters values to search.

like image 893
nilanjan Avatar asked Dec 05 '12 01:12

nilanjan


1 Answers

I wrote a tool that allows browsing biological regulatory networks, showing two SVG panels side-by-side. Each panel contains a force-layout network of transcription factors (the nodes), as drawn by the d3.js API. You can type in the name of a transcription factor and it will highlight it using the same code as is used when a mouseover event occurs. Exploring the code might give you some insight into how it's done.

like image 173
Alex Reynolds Avatar answered Sep 28 '22 12:09

Alex Reynolds