examples/d3ParallelCoordinates/parallelCoordinates.js
function brush() {
      var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),
          extents = actives.map(function(p) { return y[p].brush.extent(); }),
          selectedPaths = foregroundPaths.filter(function(d) {
            return actives.every(function(p, i) {
              return extents[i][0] <= d[p] && d[p] <= extents[i][1];
            });
          });
      foregroundPaths.style('display', 'none');
      selectedPaths.style('display', null);
      model.selectedData = selectedPaths.data();
    }
function brush() {
      var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),
          extents = actives.map(function(p) { return y[p].brush.extent(); }),
          selectedPaths = foregroundPaths.filter(function(d) {
            return actives.every(function(p, i) {
              return extents[i][0] <= d[p] && d[p] <= extents[i][1];
            });
          });
      foregroundPaths.style('display', 'none');
      selectedPaths.style('display', null);
      model.selectedData = selectedPaths.data();
    }
function brush ( ) { var actives = dimensions . filter ( function ( p ) { return ! y [ p ] . brush . empty ( ) ; } ) , extents = actives . map ( function ( p ) { return y [ p ] . brush . extent ( ) ; } ) , selectedPaths = foregroundPaths . filter ( function ( d ) { return actives . every ( function ( p , i ) { return extents [ i ] [ 0 ] <= d [ p ] && d [ p ] <= extents [ i ] [ 1 ] ; } ) ; } ) ; foregroundPaths . style ( 'display' , 'none' ) ; selectedPaths . style ( 'display' , null ) ; model . selectedData = selectedPaths . data ( ) ; }
Handles a brush event, toggling the display of foreground lines.
Handles a brush event toggling the display of foreground lines .