#3459·vis

Network: how to select a node programmatically and fire an event

Author: zhehaoCreated Sep 19, 2017Updated Jul 8, 2019

I draw a network with hundreds of nodes, there is a menu for users to select the node they care most, I also follow the official example -- Neighbourhood Highlight.

Now I want to pass the node id selected -- to fire an event -- then the event listener(like on) would call neighbourhoodHighlight to highlight neighbour nodes and edges.

But I found that selectNodes method Does not fire events , as mentioned in document. So how can I tigger the node id selection action as an event to call back neighbourhoodHighlight function?