I want to change the color of all my svg elements with class "tmp-click" to yellow
var yellow = d3.select('svg')
.selectAll('.tmp-click')
.attr("fill","yellow);
When executing the code only one of the elements is changed, what did I miss?
Do it this way
var yellow = d3.selectAll('.tmp-click')
.style("fill","yellow");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With