I have created a force directed graph using D3.JS
Library,
On mouseover
what I would like to do is to highlight a node and its neighbour node and fade away all other nodes.
On mouseout
event I want to reset the graph like the way it is.
I have tried the following code for the highlight part but its not working:
.on("mouseover", function(d) {
d3.select(this).select("circle").style("stroke-width", 6);
var nodeNeighbors = graph.links.filter(function(link) {
return link.source.index === d.index || link.target.index === d.index;})
.map(function(link) {
return link.source.index === d.index ? link.target.index : link.source.index; });
Following is thelink for my force directed graph