function fadeIn(selection, speed) {
            selection
                .style('opacity', 0)
                .transition()
                .duration(speed / 8)
                .style('opacity', 1)
                .on('end', function () {
                    fadeOut.call(this, speed);
                });
        } // Transition text from full opacity to zero opacity to create fade-out effect.
// Transition text from zero opacity to full opacity to create fade-in effect.
Transition text from zero opacity to full opacity to create fade-in effect.
Transition text from zero opacity to full opacity to create fade - in effect .
function fadeIn(selection, speed) {
            selection
                .style('opacity', 0)
                .transition()
                .duration(speed / 8)
                .style('opacity', 1)
                .on('end', function () {
                    fadeOut.call(this, speed);
                });
        } 
function fadeIn ( selection , speed ) { selection . style ( 'opacity' , 0 ) . transition ( ) . duration ( speed / 8 ) . style ( 'opacity' , 1 ) . on ( 'end' , function ( ) { fadeOut . call ( this , speed ) ; } ) ; }
Transition text from zero opacity to full opacity to create fade-in effect.
Transition text from zero opacity to full opacity to create fade - in effect .
// Transition text from full opacity to zero opacity to create fade-out effect.