I'm trying to adjust this example http://bl.ocks.org/kerryrodden/7090426:
so that the hover over selects all segments of the same name instead of the ancestors of the current segment.
This is the script
vis.selectAll("path")
.filter(function(node) {
return (sequenceArray.indexOf(node) >= 0);
})
.style("opacity", 1);
}
Thank you kindly for your assistance
The code that you mentioned in the question should be replaced with the following code:
var currentName = d.name;
vis.selectAll("path")
.filter(function(node) {
return (node.name == currentName);
})
.style("opacity", 1);
}
The effect is shown here: (demo jsfiddle is also available; this is somewhat scaled down version of the original example that I used for debugging; also, this jsfiddle is the version with original highlighting, if you can make use of it)