Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
.on({
mouseover: function mouseover() {
d3.select(this).style({
fill: style.text.colors.hover
})
},
mouseout: function mouseout() {
d3.select(this).style({
fill: style.text.colors.default
})
}
})
if (!tooltipOptions.disabled) {
nodeEnter.call(d3tooltip(d3, 'tooltip', {...tooltipOptions, root})
.text((d, i) => getTooltipString(d, i, tooltipOptions))
.style(tooltipOptions.style)
)
}
// g inside node contains circle and text
// this extra wrapper helps run d3 transitions in parallel
const nodeEnterInnerGroup = nodeEnter.append('g')
nodeEnterInnerGroup.append('circle')
.attr({
'class': 'nodeCircle',
r: 0
})
.on({
click: clickedNode => {
if (d3.event.defaultPrevented) return