src/charts/legend.js
function fadeLinesBut(exceptionItemId) {
            let classToFade = 'g.legend-entry';
            let entryLine = svg.select(`[data-item="${exceptionItemId}"]`);

            if (entryLine.nodes().length){
                svg.select('.legend-group')
                    .selectAll(classToFade)
                    .classed(isFadedClassName, true);

                entryLine.classed(isFadedClassName, false);
            }
        }
function fadeLinesBut(exceptionItemId) {
            let classToFade = 'g.legend-entry';
            let entryLine = svg.select(`[data-item="${exceptionItemId}"]`);

            if (entryLine.nodes().length){
                svg.select('.legend-group')
                    .selectAll(classToFade)
                    .classed(isFadedClassName, true);

                entryLine.classed(isFadedClassName, false);
            }
        }
function fadeLinesBut ( exceptionItemId ) { let classToFade = 'g.legend-entry' ; let entryLine = svg . select ( ` ${ exceptionItemId } ` ) ; if ( entryLine . nodes ( ) . length ) { svg . select ( '.legend-group' ) . selectAll ( classToFade ) . classed ( isFadedClassName , true ) ; entryLine . classed ( isFadedClassName , false ) ; } }
Applies the faded class to all lines but the one that has the given id
@param  {number} exceptionItemId Id of the line that needs to stay the same
@private
Applies the faded class to all lines but the one that has the given id