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