I was going through the following post:
highlight selected node
Really a nice solution... I am a newbie to d3 and fascinated with its flexibility. I am facing problem at one point. Instead of filtering the nodes on mouseover, I want to filter it on the basis of text entered (node name or id) in a html textbox. Any idea how to achieve this??
Regards
I actually had to do something like this for a project at work. The solution I came up with was to give each node a boolean property which I called isInFilter.
Once the user enters in the text, process it and then loop through all the nodes and assign isInFilter for each node either TRUE or FALSE. Then, your condition for the node displaying (or doing whatever transition you want to do) simply becomes a check on the isInFilter property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With