Home:ALL Converter>Selecting elements and styling them with selectAll and classed is not working

Selecting elements and styling them with selectAll and classed is not working

Ask Time:2019-08-17T01:08:00         Author:xkk1357

Json Formatter

I'm trying to select a bunch of lines and hide them on a mouseover event. I looked around and found some stackoverflow posts explaining that all you have to use is "selectAll" and "styled" or "selectAll" and "classed", to just change the style or class of the elements. However, for some unknown reason, this does not appear to be working.

As of right now, I'm trying the following:

d3.selectAll("#Team")
            .classed("lollipop", false)
            .classed("hidden", true);

I've also tried:

d3.selectAll("#Team")
            .style('display', 'none')

However, this is having absolutely no effect - the graph looks exactly the same. Is there any reason why this would not work?

Author:xkk1357,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/57528614/selecting-elements-and-styling-them-with-selectall-and-classed-is-not-working
yy