Get class of selected svg element in d3

How do I use an instance <rect>

for svg

for its class?

I need to delete lines that have the same class as the click <rect>

.

I tried using selction.class()

which clearly didn't work and didn't help selection.classed()

.

+3


source to share


1 answer


When using d3 I found this to work



selection.attr("class");

      

+4


source







All Articles