Closed hy-net closed 1 year ago
You have to override linkUpdate
function
chart.linkUpdate(function (d, i, arr) {
d3.select(this)
.attr("stroke", d => d.data._upToTheRootHighlighted ? '#152785' : 'lightgray') // modify your color here
.attr("stroke-width", d => d.data._upToTheRootHighlighted ? 5 : 2)
if (d.data._upToTheRootHighlighted) {
d3.select(this).raise()
}
})
@bumbeishvili, this seems to highlight the link.
May I know how to change the color of the Node itself when highlighted?
There is a node update function which does the same for node
You can see its content here
How to set the highlighted color when callig
setHighlighted()