Я обнаружил, что оба они работают в моем тесте:
.on("mouseover",
function() {
d3.select(this)
.select("text")
.style("fill","red");
})
или
.on("mouseover",
function() {
d3.select(this)
.select("text")
.attr("fill","red");
})