I don’t believe that arrow functions bind this
. Try a function
function:
d3.select(test).selectAll('g.test-class > text').filter(function() {
return d3.select(this).text() === "second node"
}).attr('fill', 'red')
I don’t believe that arrow functions bind this
. Try a function
function:
d3.select(test).selectAll('g.test-class > text').filter(function() {
return d3.select(this).text() === "second node"
}).attr('fill', 'red')